With this AHK script running:

^!Left::
Send {Media_Prev}
MsgBox, 0, , Pressed Left!
return

^!Right::
Send {Media_Next}
MsgBox, 0, , Pressed Right!
return

^!Space::
Send {Media_Play_Pause}
MsgBox, 0, , Pressed Space!
return

^!Down::
Send {Volume_Down}
MsgBox, 0, , Pressed Down!
return

^!Up::
Send {Volume_Up}
MsgBox, 0, , Pressed Up!
return

All the key combinations work. I see every message (ie "Pressed Left", "Pressed Right", etc) however only {Volume_Up} and {Volume_Down} actually seem to work. {Media_Next}, {Media_Prev} and {Media_Play_Pause} do nothing.

This is based on feedback from the Windows 10 media overlay:

enter image description here

What would be causing this?

p.s. I asked a similar question earlier but I have discovered significant new information so the base question had changed, thus the new post.

  • I was just looking at similar scripts today with these hotkeys (there is actually a volume control popup script in the AutoHotkey help files that does something similar--I chose not to use because I like the regular volume bar shown in your picture on the left), but at any rate--if you actually press Media_Next/Prev/Play keys on a real keyboard, do they work the way you expect? i.e., does AutoHotkey match the operation of the real keys themselves, or do the real keys work but AutoHotkey send statements don't? – JJohnston2 Aug 10 at 3:44
  • 1
    I tried your hotkey for next song, and it worked for me, just like the next button on my keyboard. If you rightclick the autohotkey icon in the taskbar, and click 'Open' and view the key history (^k): do you see the media keys come up? – JackStoneS Aug 10 at 12:54
  • I have a script running on my Win10 machine right now using those commands and it works. Check the key history as JackStoneS suggested, but I think it is likely an issue with your system or the specific application you are using at the moment. You might try testing it with another app like VLC (which is what I tested mine with just now). – techturtle Aug 10 at 14:39
  • I think it must be a Spotify specific issue. I'm now using the script found here: reddit.com/r/AutoHotkey/comments/82suso/… – Scott Beeson Aug 10 at 14:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.