Sign in to follow this  
Followers 0
Hunter

Help Pausing Script!

8 posts in this topic

Hello, I need help pausing my script I made a while ago. I need it to pause for 2 seconds. Can some one give me the Code. Oh yea and here is my Script.

$answer = msgbox(1, "URC", "Ultimate Left Clicker Was Created By: Hunter Davis")
$answer = msgbox(1, "URC", "F4 Starts the RC & F5 Exits the RC")

HotKeySet("{F5}", "ExitProg") 
HotKeySet("{F4}", "StartProg") 

While 1
    Sleep(100) 
    Wend

Func StartProg()  
    while 1
    MouseClick("left")
    Sleep(50)
    WEnd
EndFunc


Func ExitProg()  
    Exit 0
EndFunc

Thank You

Hunter Davis.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Sleep(2000) Pauses the execution of the script for 2 seconds

Edited by oMBRa

Share this post


Link to post
Share on other sites

Hello, I need help pausing my script I made a while ago. I need it to pause for 2 seconds. Can some one give me the Code. Oh yea and here is my Script.

Hey Hunter,

What are those Sleep() statement used for in your script?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Sleep(2000) Pauses the execution of the script for 2 seconds

I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to?

Share this post


Link to post
Share on other sites

add this to your code will cause a 2 second pause when the pause key is pressed. I'm sure you can add what you need from this.

-1

HotKeySet("{Pause}", "pause")

Func pause()
ToolTip("Script is Paused.")
sleep(2000)
ToolTip("")
EndFunc

What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post


Link to post
Share on other sites

I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing.

why didn't you try yourself before posting?

Theirs 2 Sleeps in the script which one do I change it to?

I can not read your mind

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to?

do you want the script to click once every 2 seconds?

Func StartProg()  
    while 1
    MouseClick("left")
    Sleep(2000) ; sleep for 2 seconds before clicking left again.
    WEnd
EndFunc
Edited by Negative1

What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post


Link to post
Share on other sites

I haven't used AutoIt for a while and I thought that sleep had to do with the pausing of the script. Oh yea, and one more thing. Theirs 2 Sleeps in the script which one do I change it to?

You know what: spend some time searching an testing yourself without bothering us.

Comeback when you have a real question

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0