ilzul Posted April 25, 2012 Posted April 25, 2012 (edited) Hello! I am new to autoit world and I just started... I was searching for a key-pressing script, I have found it, but I need one more thing I need a function to pause/unpause the pressing... Here is what I have, like an example: while 1 send("1") Sleep(100) Wend Thanks in advance! Edited April 25, 2012 by ilzul
hannes08 Posted April 25, 2012 Posted April 25, 2012 There are plenty of examples in the forum. Also look for HotKeySet in the helpfile! Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
ZacUSNYR Posted April 25, 2012 Posted April 25, 2012 There are plenty of examples in the forum. Also look for HotKeySet in the helpfile! I think you're thinking he's looking to "learn" how to do something. He took the most basic, smallest amount of time, example he could find. Then asking someone here to write it for him to be the way he wanted it. ; Declare a variable to use as a flag. Global $bEnable = False ; Set hotkeys, esc to exit and F3 to enable/disable. HotKeySet("{ESC}", "_Exit") ; Run _Exit function HotKeySet("{F3}", "_EnableDisable") ; Run _EnableDisable function While 1 ; If enabled then send 1. If $bEnable Then Send("1") Sleep(100) WEnd ; _EnableDisable Function called by hotkey Func _EnableDisable() If $bEnable Then ; if $bEnable is enabled, then $bEnable = False ; Disable. Else ; else if it's disabled. $bEnable = True ; Enable. EndIf EndFunc ; _Exit Function called by hotkey Func _Exit() ;Remove HotKeys HotKeySet("{ESC}") HotKeySet("{F3}") Exit ; Exit EndFunc There we go... wrote it for ya. Enjoy your gaming lol
hannes08 Posted April 25, 2012 Posted April 25, 2012 yes, that's what I was thinking about that post in the first place. So you know wrote it for him ... but, where's the learning effect? Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
ilzul Posted April 25, 2012 Author Posted April 25, 2012 (edited) He took the most basicwell, i didn't, i have been searching for a while for this, and i found something and it worked in my script...also i would like to learn, and yes @hannes08 there is not a learning effect anymore... but i can understand now from ZacUSNYR script too xDbtw, thank you both very much, it did helped me edit: now i have to edit my buttons, i think i can do it for myself now Edited April 25, 2012 by ilzul
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