Jump to content

Recommended Posts

Guest Bullet
Posted

Is there a way to put a few seconds between your commands in the script. I want to have the script do an action and then wait 5 sec. and the do another action a couple of times each with a pause of 5 sec. After that i want the script to repeat itself. Is this possible and how?

Plz tell me cause the script needs to be done soon.

Posted

Is there a way to put a few seconds between your commands in the script. I want to have the script do an action and then wait 5 sec. and the do another action a couple of times each with a pause of 5 sec. After that i want the script to repeat itself. Is this possible and how?

Plz tell me cause the script needs to be done soon.

<{POST_SNAPBACK}>

Lookup "While" or "For Next" and "Sleep" in the Help file

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

Is there a way to put a few seconds between your commands in the script. I want to have the script do an action and then wait 5 sec. and the do another action a couple of times each with a pause of 5 sec. After that i want the script to repeat itself. Is this possible and how?

Plz tell me cause the script needs to be done soon.

<{POST_SNAPBACK}>

Sleep(5000) to "wait 5 sec"

Read FAQ #4 to make script repeat:

http://www.autoitscript.com/autoit3/docs/faq.htm#4

[size="1"][font="Arial"].[u].[/u][/font][/size]

Guest Bullet
Posted

Thnx for the help ppl :( first script i made and it turned out oke :( maybe ill post it later when done

Guest Bullet
Posted

Now i have the script looping, but is there a way i can stop the loop bij pressing a button?

Posted

Now i have the script looping, but is there a way i can stop the loop bij pressing a button?

<{POST_SNAPBACK}>

from the help file under hotkeys:

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
×
×
  • Create New...