Steve B Posted August 9, 2017 Posted August 9, 2017 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!
deanishe Posted August 9, 2017 Posted August 9, 2017 Please post the actual workflow if you'd like help. Without it, we're basically just guessing, which wastes your and our time.
vitor Posted August 9, 2017 Posted August 9, 2017 In addition to what @deanishe said: 18 minutes ago, Steve B said: query="{query}" echo -n $query This is redundant. echo -n "{query}" accomplishes the exact same. Also, don’t use Run NSAppleScript; use Run Script with /usr/bin/osascript (AS) and it’ll pass the argument. Steve B 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now