Jump to content

run AutoIT script for a length of time


pc_gurl
 Share

Recommended Posts

  • Moderators

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...