Piano Autoplayer GMOD

Ask gaming related questions (AHK v1.1 and older)
secretlyabee
Posts: 1
Joined: 11 Jun 2021, 17:08

Piano Autoplayer GMOD

Post by secretlyabee » 11 Jun 2021, 17:13

I've been having trouble getting AHK to play the keystrokes in-game. It registered out of game, but wont work in-game. This is the script I'm using. Any solutions?

Code: Select all

Gui, Add, Text,, ------------------------------------------Key Delay-----------------------------------------
Gui, Add, Edit, w300 vKeyDelay, 100
Gui, Add, Text,, ----------------------------------------Piano Music-----------------------------------------
Gui, Add, Edit, R10 w300 vPianoMusic
Gui, Add, Text,, 								  F4 To Play Piano Music
Gui, Add, Text,, 								Press F8 To Suspend/Resume
Gui, Add, Text,, 								  Edited by WalkerOnly
Gui, Show
F4::
!F4::
Gui, Submit, Nohide
PianoMusic := RegExReplace(PianoMusic, "`n|`r|/") ; Remove Stuff
X := 1
while (X:=RegExMatch(PianoMusic, "U)(\[.*]|.)",Keys, X))
{	
	X+=StrLen(Keys)
	Keys := Trim(Keys, "[]")
	SendInput % Keys
	Sleep, %KeyDelay%
}
return

f8::

Pause

Suspend

return

GuiClose:
	ExitApp

Return to “Gaming Help (v1)”