Morgan Posted April 25, 2018 Share Posted April 25, 2018 Hey there, Question everyone from a scripting newbie :) I'm trying to write a workflow to launch an app (the Opera Browser) and then, depending on the {query} I bring in to the workflow (based on what I type into Alfred after the keyword trigger), it then runs the app with a different argument (which user profile to open up with). So, I created a keyword trigger "operauser" and when I run it, if I bring in the parameter "work" (so I type "operauser work" from Alfred) that it then runs the Opera browser, with the profile directory that I've associated with my work. I set the language as bash, the input as {query} and here is the script: if [ {query} = "work" ] ; then /Applications/Opera.app/Contents/MacOS/Opera --user-data-dir="/Users/myusername/OperaProfiles/Work" But when I activate this workflow and type "operauser work" from Alfred.... nothing happens :( I've tried variations, like with the "open" command as well, but nothing seems to do it. Any suggestions? Thank you in advance for your help :) morgan Link to comment
deanishe Posted April 25, 2018 Share Posted April 25, 2018 Hi @Morgan, welcome to the forum. 1 hour ago, Morgan said: But when I activate this workflow and type "operauser work" from Alfred.... nothing happens Please upload the workflow somewhere and post a link. We can't tell you what's wrong with a workflow we've never seen… Link to comment
Morgan Posted April 25, 2018 Author Share Posted April 25, 2018 Ahhh good idea! Here is a link to it in Dropbox: https://www.dropbox.com/s/8kj47wwujwb1w3z/Opera Test Three.alfredworkflow?dl=0 Thank you for your help!!!!! morgan Link to comment
deanishe Posted April 25, 2018 Share Posted April 25, 2018 Alfred's debugger says: [2018-04-25 21:42:41][ERROR: action.script] /bin/bash: -c: line 2: syntax error: unexpected end of file You forgot the fi to close the if clause. Link to comment
Morgan Posted April 25, 2018 Author Share Posted April 25, 2018 "OMG" THAT WORKED!!! Deanishe, Thank you soooo much. I wasted two hours on such silly and obvious mistake. I appreciate your help!!!!!! I'd love to invite you to a coffee to thank you, if you ever come to Argentina Link to comment
deanishe Posted April 25, 2018 Share Posted April 25, 2018 ? Don't forget to check the debugger next time Link to comment
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