Jump to content

[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!  :)

 

Link to comment
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?

Link to comment
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

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