AutoHotKey(오토핫키) 설명서 Winamp

Posted by 발전소장
2014. 8. 14. 15:00 AutoHotKey/misc

Automating Winamp

This section demonstrates how to control Winamp via hotkey even when it is minimized or inactive. This information has been tested with Winamp 2.78c and should work for Winamp 2.x and possibly other major releases as well. Please post changes and improvements in the forum or contact the author.

This example makes the Ctrl+Alt+P hotkey equivalent to pressing Winamp's pause/unpause button:

^!p::
SetTitleMatchMode, 2
IfWinNotExist, - Winamp
	IfWinNotExist, Winamp 2.  ; Adjust this if your Winamp is not 2.x
		return
; Otherwise, the above has set the "last found" window for us:
ControlSend, ahk_parent, c  ; Pause/Unpause
return

Here are some of the keyboard shortcuts available in Winamp 2.x (may work in other versions too). The above example can be revised to use any of these keys:

Key to send Effect
c Pause/UnPause
x Play/Restart/UnPause
v Stop
+v Stop with Fadeout
^v Stop after the current track
b Next Track
z Previous Track
{left} Rewind 5 seconds
{right} Fast-forward 5 seconds
{up} Turn Volume Up
{down} Turn Volume Down
; This next example asks Winamp which track number is currently active:
SetTitleMatchMode, 2
SendMessage, 1024, 0, 120, - Winamp
if ErrorLevel <> FAIL
{
	ErrorLevel++  ; Winamp's count starts at 0, so adjust by 1.
	MsgBox, Track #%ErrorLevel% is active or playing.
}