Jump to content

[SOLVED] Workflow to launch an App with Parameters?


Recommended Posts

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

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

"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
  • vitor changed the title to [SOLVED] Workflow to launch an App with Parameters?

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...