Aceguy Posted December 19, 2007 Share Posted December 19, 2007 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. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 19, 2007 Share Posted December 19, 2007 is there anyway to obtain the results from several pixelsearches. example script.$search1= pixelsearch(.......)$search2 = pixelsearch(.......)$search3 = pixelsearch(......)results = $search1 = notfound$search2 = found$search3 = foundWhat'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 More sharing options...
searchresult Posted December 19, 2007 Share Posted December 19, 2007 (edited) 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 December 19, 2007 by searchresult Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Author Share Posted December 19, 2007 thanks for quick reply, but if the pixelsearch doesnt find the colour is sets @error to 1. but wont write to the array.? i think this is correct.? [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Aceguy Posted December 19, 2007 Author Share Posted December 19, 2007 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) [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
searchresult Posted December 19, 2007 Share Posted December 19, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now