Eternalty Posted November 19, 2009 Posted November 19, 2009 So here's the thing, I made this Script for a game to be a simple macro but the only thing wrong with it is I want it just to be one button instead of having to press the "HOME" key to start and the "END" key to stop. I wanted it to be "NUMPADDOT" but can't seem to tweak it the way I want. Any suggestions? ;##################### Options ####################### Opt("SendKeyDownDelay", 0) Opt("SendKeyDelay", 0) ;##################### Hotkeys ####################### HotkeySet("{HOME}", "_Start") HotkeySet("{END}", "_Stop") ;##################### Variables ####################### $stop = 0 ;##################### Main Loop ####################### While 1 $stop = 0 Sleep(5) WEnd ;##################### Functions ####################### Func _Start() Do Send("d4") Sleep(200) Until $stop = 1 EndFunc Func _Stop() $stop = 1 EndFunc
Authenticity Posted November 19, 2009 Posted November 19, 2009 ;##################### Options ####################### Opt("SendKeyDownDelay", 0) Opt("SendKeyDelay", 0) ;##################### Hotkeys ####################### HotKeySet("{NUMPADDOT}", "_StartUndStop") HotKeySet("{ESC}", "_Quit") ;##################### Variables ####################### Local $fStart = False ;##################### Main Loop ####################### While 1 Sleep(20) WEnd ;##################### Functions ####################### Func _StartUndStop() $fStart = Not $fStart While $fStart Send("d4") Sleep(200) WEnd EndFunc ;==>_Start Func _Quit() 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