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:
AppleScript:
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:
query="{query}"
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?
Thanks!