Sign in to follow this  
Followers 0
ilzul

start/stop and continue

5 posts in this topic

#1 ·  Posted (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 by ilzul

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

He took the most basic

well, 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 xD

btw, 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 by ilzul

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0