Jump to content

Nested for loop works first time but then stops


Go to solution Solved by ripdad,

Recommended Posts

Func 123()
Local $xPos1 = 47
Local $xPos2 = 19
Local $xPos3 = 44
For $i = 1 To 4
    MouseClick("Right", $xPos1,300)
    Sleep(500)
    MouseClick("Right", $xPos1,457,2,300)
    Sleep(500)
    MouseDown("Left")
    Sleep(2000)
    MouseUp("Left")
    For $i=1 To 4
        MouseClick("Left",$xPos2,425)
        Sleep(500)
    Next
    MouseClick("Right",$xPos2,425)
    Sleep(500)
    MouseClick("Right",$xPos2,425)
    Sleep(500)
    MouseClick("Left",$xPos3,91)
    $xPos1 = $xPos1 + 325
    $xPos2 = $xPos2 + 325
    $xPos3 = $xPos3 + 325
    Sleep(500)
Next
EndFunc

My script gets to the last line but then stops. Can anyone see why it wouldn't loop 4 times?

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

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