Jump to content

selection in macos + keyword


Recommended Posts

@GuiBThanks again for the helpful explanation!

 

You're definitely correct about my mistake usually being related to confusion about how Alfred does/not pass variables (re: strings, etc.). Some days it feels like the bane of my existence 🤦‍♂️ Ha

 

Thanks again for all of your help with everything! Happy Holidays!

Link to comment
9 hours ago, Jasondm007 said:

confusion about how Alfred does/not pass variables (re: strings, etc.)

 

It's pretty straightforward, actually. The only time Alfred might pass your script multiple arguments (via ARGV) is from a File Filter or a Hotkey with Argument = "Selection in macOS". At all other times, arg and variables are always single strings. If you try to use any other datatype, Alfred will convert it to a string, e.g. if you set arg in your JSON to an array, Alfred will convert it to a tab-delimited string before it reaches the next action.


If you want to pass around anything that isn't a string, you can either first convert it to a string (e.g. using JSON) and then back again in the next action, or save it to a file.

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