Sign in to follow this  
Followers 0
Seagul

imagesearch into an array

1 post in this topic

#1 ·  Posted (edited)

I'm new to understanding these arrays, so here's what I have very basic, still need to compare the distance in each array.

$a1 = 0
    $b1 = 0
    $target = _ImageSearchArea("target.gif", 0, $x1, $y1, $x2, $y2, $a1, $b1, 35)
    $shiptarget = _ImageSearchArea("ship.gif", 0, $x1, $y1, $x2, $y2, $sx1, $sy1, 35)
    $distance = Sqrt((Abs($a1 - $sx1)) ^ 2 + (Abs($b1 - $sy1)) ^ 2)
    $array[$icount] = $a1 & $b1
    If $target = 1 & $distance >= 400 Then
        $icount = $icount + 1
        MouseMove($array[$icount], 0)
        MouseDown($Click)
        Sleep(100)
        MouseUp($Click)
        Call("FindGlitter")
    EndIf
Edited by Seagul

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