Jump to content

How to Incorporate Alfred Variables into NSApplescript?

Recommended Posts

Hello all-


I'm quite new to the var/arg step in Alfred, but what I need to accomplish is this:


Keyword to input first query, in this case {first name}.

Store first name value as variable.

Second input to be stored, in this case {last name}.

Store last name value as variable.

Pass Alfred variables into NSApplescript to be converted to applescript variables.  


I understand that you can simply use q as the variable for a single input, but how do you reference multiple Alfred-stored variables in the applescript?


Thank you so much.



Link to comment

Hi there,


This thread really belongs in the Workflow Help & Questions forum, which is where I'm going to move it to.


The answer to your question is hopefully in the [HOW TO] Workflow/environment variables stickied thread at the top of that forum.


If you're still not clear on something, let us know.


Also, I'd recommend using a Run Script Action with Language = /usr/bin/osascript (AS) rather than Run NSApplescript. The reason is that the latter runs on Alfred's main thread and thus blocks Alfred until it completes.

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