Jump to content
Sign in to follow this  

imagesearch into an array

Recommended Posts


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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.