One key to pass multiple media commands

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
iamkl00t
Posts: 2
Joined: 19 Jul 2018, 03:18

One key to pass multiple media commands

19 Jul 2018, 03:36

Hi folks, I'm new to this so please go easy...

I have the following script which works fine and I use to advance my Spotify playlist:

; "CTRL + LEFT" for previous
^Left::Media_Prev

; "CTRL + RIGHT" for next
^Right::Media_Next

; "CTRL + Space" for pause
^Space::Media_Play_Pause

What I want to add is a way to just display the current song on the screen using the same Windows 10 Media interface. Pausing followed by immediately playing does this but I can't work out how to pass multiple commands with one shortcut.. at the moment I have the following:

; "SHIFT + Space" for what's playing
+Space::
Media_Play_Pause
Sleep, 500
Media_Play_Pause
Return

But it doesn't work... can anyone help?
gregster
Posts: 9012
Joined: 30 Sep 2013, 06:48

Re: One key to pass multiple media commands

19 Jul 2018, 06:26

In your working hotkeys you are actually doing remappings... the last case is different. Here you need to Send the Media_Play_Pause key twice.

Code: Select all

+Space::
Send, {Media_Play_Pause}
Sleep, 500
Send, {Media_Play_Pause}
Return
iamkl00t
Posts: 2
Joined: 19 Jul 2018, 03:18

Re: One key to pass multiple media commands

19 Jul 2018, 07:09

Perfect! :bravo: thanks so much

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: alawsareps, mebelantikjaya, mikeyww, RussF and 306 guests