Jump to content

someone help me fix my loop!


Recommended Posts

heres the script...if it goes to the if @error part it messes the loop up...got any ideas?

sleep (5000)

$pixel = 13816329

for $r = 1 to 4500

$a = pixelsearch (841,508,850,513,$pixel,5)

if @error Then

mousemove (870,358)

sleep (1000)

mouseclick ("left")

Else

mousemove ($a[0],$a[1])

sleep (800)

mouseclick ("left")

sleep (800)

mouseclick ("left")

sleep (2700)

Endif

Next

Link to comment
Share on other sites

heres the script...if it goes to the if @error part it messes the loop up...got any ideas?

sleep (5000)

$pixel = 13816329

for $r = 1 to 4500

$a = pixelsearch (841,508,850,513,$pixel,5)

if @error Then

mousemove (870,358)

sleep (1000)

mouseclick ("left")

Else

mousemove ($a[0],$a[1])

sleep (800)

mouseclick ("left")

sleep (800)

mouseclick ("left")

sleep (2700)

Endif

Next

There is no reason I can see for that to be a problem. Define "messes the loop up". What does it do?

:rolleyes:

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

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