Jump to content

Loop question


Recommended Posts

I have a while loop that is going constantly. But -- every 30 minutes I want the loop to stop and close a running process then resume the loop...

Here is my code that is not working:

$begin = TimerInit ()

While 1

$dif = TimerDiff ($begin)

MouseMove(60, 400)

MouseMove(222, 100)

if $dif > 1800000 then ;after 30 mins do this then go back to loop above

MouseMove(444, 100)

ExitLoop

WEnd

WEnd

This is not working for me. Once the 444,100 mousemove starts it wont stop.

Thanks for the help!

Edited by holyearth
Link to comment
Share on other sites

How do I do that?

$begin = TimerInit()

You only did that once, and didn't reset it again once you reached the timeout.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

$begin = TimerInit()

You only did that once, and didn't reset it again once you reached the timeout.

:)

I tried it, but it doesnt work:

$begin = TimerInit ()

While 1

$dif = TimerDiff ($begin)

MouseMove(60, 400)

MouseMove(222, 100)

While $dif > 6000

WinMove("Notepad", "", 216, 8) ; x , y

$begin = TimerInit ()

WEnd

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...