Can i control the music player with AHK?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Dubs
Posts: 23
Joined: 19 May 2016, 19:55

Can i control the music player with AHK?

31 May 2016, 00:43

My PC has some buttons on the hardware for controlling music players: Previous, Play/Pause, Next, and Stop. I'd like to map a few of these buttons to AHK, can someone help me?

1) 'Play/Pause' to be toggled when Ctrl+Alt are pressed

2) 'Next' when Alt+Middle-click are pressed

3) 'Previous' when Ctrl+Middle-click are pressed
GEV
Posts: 1002
Joined: 25 Feb 2014, 00:50

Re: Can i control the music player with AHK?

31 May 2016, 00:58

Code: Select all

LCtrl & LAlt:: Send {Media_Play_Pause}
!MButton:: Send {Media_Next}
https://autohotkey.com/docs/commands/Send.htm
Dubs
Posts: 23
Joined: 19 May 2016, 19:55

Re: Can i control the music player with AHK?

04 Jun 2016, 19:37

Thanks for your help :]
sobuj53
Posts: 55
Joined: 19 Mar 2015, 16:08

Re: Can i control the music player with AHK?

04 Jun 2016, 22:29

I use this code, it only works if the player window is present,

Code: Select all

;Key maping for windows media player and Groove Music

#IfWinExist (Windows Media Player|Groove Music)
LCtrl & LAlt:: Send {Media_Play_Pause}
!MButton:: Send {Media_Next}
#IfWinExist

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ymnaren and 136 guests