I have built an arcade cabinet which has no mouse or keyboard, just game buttons.
When window10 starts I want to use autohotkey to use my buttons to start the games.
My script looks like this.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
GroupAdd, vGroupDesktop, ahk_class Progman ;desktop
GroupAdd, vGroupDesktop, ahk_class WorkerW ;desktop
#IfWinActive, ahk_group vGroupDesktop
Joy2::
Run, C:\PinballX\Pinball.exe
Return
Joy3::
Run, C:\CoinopsArcade\ARCADE(Micro).exe
Return
Joy4::
Run, C:\CoinopsArcade\ARCADE(All).exe
Return
Joy11 & Joy12::
run, %comspec% /k shutdown -r -t 30
Return
#IfWinActive
Any suggestions? As a test put an msg box instead and it detects the buttons!
Regards
Johan