Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Multiple commands to one hotkey



  • Please log in to reply
3 replies to this topic
agntclank
  • Members
  • 3 posts
  • Last active: Jan 21 2013 07:33 PM
  • Joined: 21 Jan 2013

How do I have one hotkey activiate multiple commands? For example, I want to have F6 run a program, and mute the computer at the same time. What I have so far is 

 

"F6::Run,%A_ProgramFiles%\LockUp\Screensaver.cmd,

Send {Volume_Mute}

return"
 
When the two lines are put in separate scripts, they both work, however, it won't work when they are combined to use the same hotkey. Help?
 
 


jNizM
  • Members
  • 928 posts
  • Last active: Jan 12 2018 09:23 AM
  • Joined: 01 Aug 2012
✓  Best Answer
F6::
	Run,%A_ProgramFiles%\LockUp\Screensaver.cmd
	Send {Volume_Mute}
return
 

1 Hotkey, 1 execution
F6::MsgBox, 1 Msgbox

1 Hotkey, 2 or more execution
F6::
	MsgBox, First Msgbox
	MsgBox, Second Msgbox
Return

[AHK] 1.1.27.04 x64 Unicode | [WIN] 10 Pro (Version 1709)
My GitHub Profile | Donations are appreciated if I could help you

agntclank
  • Members
  • 3 posts
  • Last active: Jan 21 2013 07:33 PM
  • Joined: 21 Jan 2013

Doesn't work. I'm not sure what's wrong with it.



agntclank
  • Members
  • 3 posts
  • Last active: Jan 21 2013 07:33 PM
  • Joined: 21 Jan 2013

Nevermind, I forgot to reload the script. Thank you.