Jump to content

Pixelsearch.


Aceguy
 Share

Recommended Posts

is there anyway to obtain the results from several pixelsearches. example script.

$search1= pixelsearch(.......)

$search2 = pixelsearch(.......)

$search3 = pixelsearch(......)

results =

$search1 = notfound

$search2 = found

$search3 = found

many thanks.

Link to comment
Share on other sites

is there anyway to obtain the results from several pixelsearches. example script.

$search1= pixelsearch(.......)

$search2 = pixelsearch(.......)

$search3 = pixelsearch(......)

results =

$search1 = notfound

$search2 = found

$search3 = found

What's wrong with what you have, save the results of each search to a different variable?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

is there anyway to obtain the results from several pixelsearches. example script.

$search1= pixelsearch(.......)

$search2 = pixelsearch(.......)

$search3 = pixelsearch(......)

results =

$search1 = notfound

$search2 = found

$search3 = found

many thanks.

dim array[15]

for $i = 0 to 14

$array[$i] = pixelsearch(....)

;instead of these dots you can create an array that contains parameters for that specific pixel

next 

;display array

hope this helps

Edited by searchresult
Link to comment
Share on other sites

i think i gots it, thanks. :)

#include <array.au3>
dim $array[15]

for $i = 0 to 14

$search = PixelSearch(558, 576,558,576,0,5,0)

if @error=1 then 
    $array[$i] = "not found"
Else
    $array[$i]= $search[0]&" "&$search[1]
    EndIf
sleep(100)

next 

_ArrayDisplay($array)
Link to comment
Share on other sites

just put in if statement that will check if there is an error and if not write to array.

dim array[15]

for $i = 0 to 14

$pixsearch = pixelsearch(....)

;instead of these dots you can create an array that contains parameters for that specific pixel

if not $pixsearch = @error then

$array[i] = $pixsearch

endif


next

;display array

if you want to see error pixels (those that were not found) just put in a "if" statement "else" and write to an array (different array like $errArray) parameters of searched pixels and then display that array

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