nyxx24 Posted November 26, 2008 Share Posted November 26, 2008 (edited) Hello, I have used the search and I am looking for more help.. I am trying to add a pixel search if then to my script and it's not working What I want is at a certain point to have it check for a grey\white shade in a small area and if found continue and if not found skip down to a lower section of the same script.. I tried and I do not get any errors but it does not work if the color is there or not it just keeps going either way I do not know if it's not working because the color is wrong due to shades and transparencies in the window or because I am doing it wrong script wise.. I got this digging through more articles, I am looking for a grey shade or an off shade of white.. PixelSearch(1395, 210, 1395, 210, 0xFFFFFF, 5) If @error Then MsgBox(0, "Not found", "I didn't find the color white") MsgBox(0, "Color Found", PixelGetColor(1395, 210)) Else MsgBox(0, "Found", "Found the color white") EndIf But It returns the color, 16777215 which from what I have read is white.. So why is it erroring out? Edited November 27, 2008 by nyxx24 Link to comment Share on other sites More sharing options...
nyxx24 Posted November 26, 2008 Author Share Posted November 26, 2008 (edited) Well pixel get color gives me BFBFBF which is about 63 or so shades of RGB value off so I expanded the shade range to 100 since the background color is almost black like 5,5,5 RGB.. and I will see how that works Edited November 27, 2008 by nyxx24 Link to comment Share on other sites More sharing options...
nyxx24 Posted November 26, 2008 Author Share Posted November 26, 2008 (edited) Using what I have found so far.. I tried using the following yesterday and this morning to see how it worked ;Pixel search if negative then proceed if positive then skip to leave PixelSearch(1395, 210, 1395, 210, 0XBFBFBF, 100) If @error Then (it continues with several lines of script or skips to:) ;Leave Else EndIf Well as an update I seem to have answered my own questions with more use of search, help and trial by error. Edited November 27, 2008 by nyxx24 Link to comment Share on other sites More sharing options...
nyxx24 Posted November 27, 2008 Author Share Posted November 27, 2008 It seems to be working at the moment.. if it starts looking like its not working I will check back! =-) As a question, and at time of posting this I am not at home so I do not have access to the help file untill tonight. I have seen some mention of a color checksum command would it be more suited to this since I am checking for the presence of a certain color in a certain pixel location? Link to comment Share on other sites More sharing options...
Aceguy Posted November 27, 2008 Share Posted November 27, 2008 just a quick help for you.... your uing pixelsearch just for 1 pixel.. why not use $col=pixelgetcolor(1395,210) if $col=16777215 then msgbox(0,"","Found 16777215",0) else msgbox(0,"","found @ 1395,210"&$col ,0) endif [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...
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