Jump to content
Sign in to follow this  

Winamp Hotkeys!

Recommended Posts


Here's a an example that will let you use custom hotkeys for winamp, I wrote this because I find the hotkeys in Winamp are way to awkward, and I couldn't find any appropriate plugins to define custom hotkeys to my liking so I made this wrapper.

I am used to 1by1 so the hotkeys go like this

Quit - Press Esc
Play - Press Ctrl + Space
Play & Pause - Press Space
Stop - Press Ctrl + Enter
Stop & Play - Press Enter
Next - Press Up
Prev - Press Down
Seek Forward - Press Right
Seek Backword - Press Left
Volume Up - Press Page Up
Volume Down - Press Page Down

And the code, youll need this in the same directory, or just download the attachment.

Note: I commented out lines, 715, and 727 in the zip file because I was getting errors.

;If $iAutoItVersion_Compare <= 0 Then Local $iOld_Opt_REF = Opt("RunErrorsFatal", 0)

#include "Winamp_Library.au3"
Opt("TrayIconHide", 1)
Opt("WinTitleMatchMode", 4)

Global $WAL_GLOBAL = 0  ;0= Use for active Winamp window, 1= Set Global as Hotkeys
Global $WAL_WIN_HANDLE = "[TITLE:Main Window; CLASS:BaseWindow_RootWnd]"
Global $WAL_QUIT = "{esc}"
Global $WAL_PLAY = "^{space}"
Global $WAL_PLAYPAUSE = "{space}"
Global $WAL_STOP = "^{enter}"
Global $WAL_STOPPLAY = "{enter}"
Global $WAL_PLAY_NEXT = "{up}"
Global $WAL_PLAY_PREV = "{down}"
Global $WAL_SEEK_FORWARD = "{right}"
Global $WAL_SEEK_BACKWORD = "{left}"
Global $WAL_VOLUME_UP = "{pgup}"
Global $WAL_VOLUME_DOWN = "{pgdn}"
Global $WAL_VOLUME_INCREMENT = -1 ; If set to higher than -1 Custom volume increment will be used

Local $az_HotKeys[11] = _
For $i = 0 To UBound($az_HotKeys)-1
    HotKeySet($az_HotKeys[$i], '_HotKey_Handler')

While 1

Func _HotKey_Handler()
    Local $gzHotKeyPress = @HotKeyPressed
    If $WAL_GLOBAL Or WinActive($WAL_WIN_HANDLE) Then
        Switch $gzHotKeyPress
            Case $WAL_QUIT
            Case $WAL_PLAY
            Case $WAL_PLAYPAUSE
            Case $WAL_STOP
            Case $WAL_STOPPLAY
            Case $WAL_PLAY_NEXT
            Case $WAL_PLAY_PREV
            Case $WAL_SEEK_FORWARD
            Case $WAL_SEEK_BACKWORD
            Case $WAL_VOLUME_UP
                If $WAL_VOLUME_INCREMENT <> -1 Then
                    _Winamp_SetVolume(_Winamp_GetVolume() + $WAL_VOLUME_INCREMENT)
                    _Winamp_SetVolume(0, 1)
            Case $WAL_VOLUME_DOWN
                If $WAL_VOLUME_INCREMENT <> -1 Then
                    _Winamp_SetVolume(_Winamp_GetVolume() - $WAL_VOLUME_INCREMENT)
                    _Winamp_SetVolume(0, 0)
        HotKeySet($gzHotKeyPress, "_HotKey_Handler")

Huge thanks goes to MrCreatoR for taking the time on making the library see here for more information:


Edited by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.