Jump to content
Sign in to follow this  
pc_gurl

run AutoIT script for a length of time

Recommended Posts

pc_gurl

can i run a script and keep it runnig and repeating itself until i stop it??

Share this post


Link to post
Share on other sites
SmOke_N

Look at While/Wend - Do/Until - For/Next for loops and HotKeySet() in the help file for manually stopping.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
seandisanti

Look at While/Wend - Do/Until - For/Next for loops and HotKeySet() in the help file for manually stopping.

sorry, i'm bored enough to do the work for you, but you should still look that stuff up...

HotKeySet("{PAUSE}","IThinkReallyLongFunctionNamesAreFunny")
MsgBox(0,"boredom","The enegergizer bunny keeps going...")
While 1
    MsgBox(0,"boredom","and going...")
WEnd
Func IThinkReallyLongFunctionNamesAreFunny()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
erebus

This should give you a general idea too:

$start = TimerInit()
Dim $diff, $i

While $diff < 5; not run more than 5 secs (approximately;-)
    $i = $i + 1
    $diff = Int(TimerDiff($start) / 1000); we turn this from msecs to seconds
    TrayTip("test", $i, 30)
    Sleep(1000); wait 1000 ms to do the loop (= 1 sec)
Wend

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.