Sign in to follow this  
Followers 0
skilzrulz

Help with Do loop, and other

2 posts in this topic

WinActivate("EVE")
Dim $delay

$delay = 60040

Do
Opt("MouseClickDelay", $delay)
    $delay = $delay + 124
    Until $delay = 70346

Dim $xFrom, $yFrom, $xTo, $yTo, $speed

$xFrom = 80
$yFrom = 592
$xTo = 83
$yTo = 452
$speed = 2
Do
MouseClickDrag ("Left", $xFrom, $yFrom, $xTo, $xFrom, $speed)
    $xFrom = $xFrom + 1
    $yFrom = $yFrom + 2
    $xTo = $xTo + 5
    $yTo = $yTo + 3
    $speed = $speed + 1

Until $xFrom = 89
Until $yFrom = 603
Until $xTo = 92
Until $yTo = 461
Until $speed = 8

(This is my very first time programming)

I just made this program for a game to auto-mine, but to make it undectable it had to vary in mouse clicks, but it gives me an error. "Until $yFrom = 603 Error: "Until" statement with no matching "Do" statement."

Any suggestions on how I should fix this up, thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Do
    MouseClickDrag ("Left", $xFrom, $yFrom, $xTo, $xFrom, $speed)
    $xFrom = $xFrom + 1
    $yFrom = $yFrom + 2
    $xTo = $xTo + 5
    $yTo = $yTo + 3
    $speed = $speed + 1
Until $xFrom >= 89 And $yFrom >= 603 And $xTo >= 92 And $yTo >= 461 And $speed >= 8

I used greater-than-or-equal-to just be safe (preventing an infinite loop), but a normal equals would probably work

EDIT: Acutally, if you just want the loop to execute 9 times you could do this:

Dim $i
For $i = 1 to 9
    MouseClickDrag ("Left", $xFrom, $yFrom, $xTo, $xFrom, $speed)
    $xFrom = $xFrom + 1
    $yFrom = $yFrom + 2
    $xTo = $xTo + 5
    $yTo = $yTo + 3
    $speed = $speed + 1
Next

where $i is a variable you create solely as the loop index.

Yet another variation:

For $xFrom = 80 to 89
    $yFrom = $yFrom + 2
    $xTo = $xTo + 5
    $yTo = $yTo + 3
    $speed = $speed + 1
Next
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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  
Followers 0