Can i control the music player with AHK?

Get help with using AutoHotkey 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: 778
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: 35
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”

Who is online

Users browsing this forum: Google [Bot], ineuw, reluct, swagfag and 142 guests