Jump to content

Control Sound with Cabinet Buttons


Recommended Posts

I leave here this tip to anyone who needs to use arcade cabinet buttons to control the sound, without a mouse or keyboard on Windows cabinet.

This is a AutoHotKey script. In the end of this post you have download link of compiled script to exe to use button 4 and button 8 of first joystick set to decrease and increase sound. I use it in Win7.

How it work?
    Pressing button 8 for more than 1,5 seconds increase sound by 2
    Pressing button 4 for more than 1,5 seconds decrease sound by 2

How change for your need?
    Install AutoHotKey (https://autohotkey.com)
    Click on Desktop with Right Mouse Button and creat a AHK Script, copy the code above and save with ahk extension.
    Simple change Joy8 or Joy4 for the key/button you want.
            For example: second joystick set button 3   ->   2Joy3
    You can give any letter of keyboard too, or Control, Alt (see https://autohotkey.com/docs/commands/KeyWait.htm)
    Compile ahk to exe file from AutoHotKey.

How to use?
    Make it autorun with startup.
    Create a Shortcut, and put it on Windows Startup Folder, or open the Run dialog from start menu and type shell:startup

   KeyWait, Joy8, T1.5
   If ErrorLevel {
      Send {Volume_Up 2}
   } Else
      Send {Joy8}

   KeyWait, Joy4, T1.5
   If ErrorLevel {
      Send {Volume_Down 2}
   } Else
   Send {Joy4}



Edited by emulor
Link to comment
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
  • Create New...