Jump to content

Allow Dynamic Placeholders to be used in JSON / Script Action output


luckman212
 Share

Recommended Posts

I have a Script Action that outputs { "alfredworkflow" : ... } JSON to set variables. The script is ruby/python and generates NNN number of "clipNNN" variables that are set to {clipboard:NNN} contents. This doesn't work. It creates the vars but they are just statically set to the literal "{clipboard:1}" etc. See related thread.


It would be quite a lot better if the placeholder substitution also applied to dynamic Script Action JSON output.

 

Link to comment
Share on other sites

54 minutes ago, luckman212 said:

It would be quite a lot better if the placeholder substitution also applied to dynamic Script Action JSON output.

 

For your particular use case, yes, but in general, no.

 

You don't want Alfred (or any software, for that matter) altering the output from your scripts by default. It makes it impossible to emit anything that software "understands" without it getting mangled.

 

Alfred already gives you the possibility to dynamically expand macros using JSON Config + Arg and Vars:

 

image.thumb.png.5528e096e415bfa8babaf54b4823efe0.png

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...