Indrion Posted March 15, 2009 Posted March 15, 2009 I'm trying to make a script that will make me move forward and back in a game, I have this so far: HotKeySet( "{ESC}", "Close" ) $Key1 = InputBox( "Input key", "Enter a key that will be repeated." ) $Key2 = InputBox( "Input key", "Enter a key that will be repeated." ) while 1 Sleep( 1000 ) Send( $Key1 ) Send( $Key2 ) WEnd Func Close() Exit() EndFunc But when I run it, it sends the imputs too fast for the game to register. How would I fix that?
Indrion Posted March 15, 2009 Author Posted March 15, 2009 Where would that go? I have almost no experience writing code.
James Posted March 15, 2009 Posted March 15, 2009 (edited) Below the includes - that's the common place. You have none, at the top. Edited March 15, 2009 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Indrion Posted March 15, 2009 Author Posted March 15, 2009 So like this? HotKeySet( "{ESC}", "Close" ) $Key1 = InputBox( "Input key", "Enter a key that will be repeated." ) $Key2 = InputBox( "Input key", "Enter a key that will be repeated." ) while 1 Sleep( 1000 ) Send( $Key1 ) Send( $Key2 ) Opt('SendKeyDownDelay', 250) WEnd Func Close() Exit() EndFunc
Authenticity Posted March 15, 2009 Posted March 15, 2009 Almost, like this: Opt('SendKeyDownDelay', 250) HotKeySet( "{ESC}", "Close" ) $Key1 = InputBox( "Input key", "Enter a key that will be repeated." ) $Key2 = InputBox( "Input key", "Enter a key that will be repeated." ) while 1 Sleep( 1000 ) Send( $Key1 ) Send( $Key2 ) WEnd Func Close() Exit() EndFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now