Reputation: 457
I have a problem with my autohotkey script for stardew. I for some reason can't get it to cast for me on button 4.I currently have this code which by all account should work:
#IfWinActive Stardew Valley
XButton1::
SendInput, {LButton Down}
KeyWait, LButton, T1.0248
SendInput, {LButton Up}
Return
Upvotes: 1
Views: 2377
Reputation: 15528
If you have problems with #IfWinActive
, then you probably haven't entered the window name that AutoHotkey is seeing. Use the WindowSpy utility from your AutoHotkey installation folder to find the correct window name.
Alternatively you could try using #IfWinActive ahk_exe proccessname.exe
.
And if your game runs as admin, then you might have to run your script as admin too.
Upvotes: 2