Jump to content
Sign in to follow this  


Recommended Posts

Ok - so here's my work in progress...

basically im making a 'pattern scanner' ... but im having some problems trying to thinking of how my loops would work... little brain dead now after completing the first part of it - the pattern array maker...

first i'll explain the pattern maker - basically is scans a block of the screen you select and puts the color of the pixels in an array ($PixelArr[$Y][$X])

OK... so now my dilema is making the scanner...

first i'll explain my theory for how i want it to work - you specify a box of searchable area - i'll select from 0,0 to 100,100 for this example.

Basically the scanner should take the key pixel - (using $PixelArr[0][0]), compare it to the existing pixel at 0,0 - and if no match is found, proceed to scan next pixel to the right. HOWEVER - if a match should be found, it should take $PixelArr[0][1] and compare the pixel next to it, instead of [0][0], and continue to do this, incrementing each time it finds a match[when it reaches the 'width' if the pattern, it would increment the y 1, reset X, then begins search again] - if it finds one that does not match, then continue where it left off with the key pixel search location...

the problem im having is making the loops to run such a scan.

Any Help would be Appreciated.. Thanx

Edited by Munky

Share this post

Link to post
Share on other sites

Something with 2 for loops liek an example here

For $i = 0 To $X
    For $j = 0 to $Y
        If $PixelArr[$i][$j] = $SOMETHING Then ExitLoop

itll only exit the Y loop so you'll have to do like a boolean varibale(true false thingy) and if it is true then exit the $x loop as well

EDIT: Woops put the wrong variables in

Edited by Thatsgreat2345

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...