Jump to content
Sign in to follow this  
lucasoldaini

[Request] Custom Argument for Hotkeys in workflows

Recommended Posts

Hello Beta tester! 

 

I've started playing with the new workflow editor ad it's really cool! for example, I'm using it to change the EQ of iTunes using an AppleScript

 

on alfred_script(q)

tell application "System Events"
	set iTunesRunning to count (every process whose name is "iTunes")
end tell

if iTunesRunning = 0 then
	tell application "iTunes" to activate
end if

if q = "q" or q = "Q" then
	set eqname to "quiet"
else if q = "f" or q = "F" then
	set eqname to "flat"
else
	set eqname to q
end if

tell application "iTunes"
	set the current EQ preset to EQ preset eqname
end tell

end alfred_script

 

however, I'd also like to use some keyboard shortcut to select the EQs I use the most (flat & quiet) … Right now I'm using a less-than-ideal solution: basically I have three different appleScript:

 

screenshot20130113at093.png

 

I'd like to be able to pass a custom parameter when the hotkey is pressed, i.e. ideally there would be an option in this menu that says "Custom parameter…"

 

 

Overall, congrats to Andrew and Vero for the solid beta!  :)

 

Share this post


Link to post
Share on other sites

You could always try modifier keys.

 

Setup one hotkey combo and then your various desired scripts. Connect them all to the same hotkey, double click the connection and choose a modifier.

 

Hope this helps some ;)

Share this post


Link to post
Share on other sites

Luca,

 

One simple way that you could accomplish this for now is to, instead of linking the hotkey to an Applescript action, link it to a shell script. Take your applescript code and convert it into a .scpt file (or whatever it is for an actual applescript), put that applescript in your workflow folder, and from the shell script, run that applescript and pass the argument to it.

 

Does that make sense?

Share this post


Link to post
Share on other sites
Luca,

 

One simple way that you could accomplish this for now is to, instead of linking the hotkey to an Applescript action, link it to a shell script. Take your applescript code and convert it into a .scpt file (or whatever it is for an actual applescript), put that applescript in your workflow folder, and from the shell script, run that applescript and pass the argument to it.

 

Does that make sense?

 

yes, even if it feels like an hack. I hope they will consider my suggestion :P

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...