; Semicolon is the start of a comment, anything behind it will not be processes as code.
; modifier keys legend:
; # = Win , ^ = Ctrl , ! = Alt , + = Shift , & = combine , < = left , > = right
;Winamp specific control
; Delete current winamp track. Requires winamp global hotkey "general: Copy file path" assigned to CTRL+HOME.
!+Delete::
Process, Exist, winamp.exe ; check to see if winamp is running.
if (ErrorLevel = 0)
return
ClipCache := ClipboardAll ; Backup clipboard.
Clipboard = ; Clear clipboard.
send, ^{Home} ; Copy file path to clipboard
DetectHiddenWindows, On ; Allows WM_Command to reach winamp.
PostMessage, 0x111,40047,,,ahk_class Winamp v1.x ; Stop playback.
PostMessage, 0x111,40048,,,ahk_class Winamp v1.x ; Next track.
FileRecycle, %Clipboard% ; Delete file of the previous track.
Clipboard := ClipCache ; Restore the original clipboard. Note the use of Clipboard and not ClipboardAll.
ClipCache = ; Clear ClipCache.
sleep 10
PostMessage, 0x111,40045,,,ahk_class Winamp v1.x ; Start playback.
PostMessage, 0x111,40222,,,ahk_class Winamp PE ; Removes missing tracks from playlist. Glitchy with a large playlist.
DetectHiddenWindows, Off
return
; Volume Control
^!NumpadAdd::
IfWinNotExist ahk_class Winamp v1.x
return
PostMessage, 0x111,40058,,,ahk_class Winamp v1.x
return
^!NumpadSub::
IfWinNotExist ahk_class Winamp v1.x
return
PostMessage, 0x111,40059,,,ahk_class Winamp v1.x
return
; Other
^!NumpadMult::
IfWinNotExist ahk_class Winamp v1.x
return
PostMessage, 0x111,40022,,,ahk_class Winamp v1.x ; Toggle repeat
return
^!NumpadDiv::
IfWinNotExist ahk_class Winamp v1.x
return
PostMessage, 0x111,40023,,,ahk_class Winamp v1.x ; Toggle shuffle
return
^!Numpad0::
IfWinNotExist ahk_class Winamp v1.x
return
SendMessage, 0x400,0,104,,ahk_class Winamp v1.x
if errorlevel = 0
PostMessage, 0x111,40045,,,ahk_class Winamp v1.x ; Play from start
else
PostMessage, 0x111,40046,,,ahk_class Winamp v1.x ; Play/Pause
return
; Mouse Hotkeys
; Multimedia
MButton & RButton::Send {vkB1sc110} ; Prev.track
MButton & LButton::Send {vkB0sc119} ; Next track
MButton & XButton1::Send {vkB3sc122} ; Play/Pause
MButton & XButton2::Send {vkADsc120} ; Vol. Mute
MButton & WheelDown::Send {vkAEsc12E} ; Vol. Down
MButton & WheelUp::Send {vkAFsc130} ; Vol. Up