Jump to content

Output variable from AppleScript

Recommended Posts

I have an AppleScript that allows the user to select a file from Finder. I want to pass that file to another script so that I can do some processing with it. So far, I haven't been able to complete this, though. This is what I have so far:



on alfred_script(q)
  set apk to choose file with prompt "Select an APK to install:" of type {"apk"}
  return apk
end alfred_script

After this script runs, a bash script is started that just tries to print out the variable:


echo -n $query

This does not work, though. Can anyone tell me what to do to get the file passed from the AppleScript to the bash script?



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...