sebgg Posted November 19, 2007 Share Posted November 19, 2007 right i understand how 2 use the pixelgetcolor to get the the hex or decimal color, when i fill out a pixelsearch line which color do i use hex or decimal? and why cant it find it? this is the example of what im trying to run $var = PixelGetColor( 504 , 458 ) if pixelsearch (400,400,620,475,$var)=$var then mouseclick("left" , 504,458,1) $var would just be the pixelnumber RRGGBB if i knew it right? basically i need the program to search an area for a pixel and then click on it. is it possible to do a word search within perameters or is that wishfull thinking? GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
FireLord Posted November 19, 2007 Share Posted November 19, 2007 righti understand how 2 use the pixelgetcolor to get the the hex or decimal color,when i fill out a pixelsearch line which color do i use hex or decimal?and why cant it find it?this is the example of what im trying to run$var = PixelGetColor( 504 , 458 )if pixelsearch (400,400,620,475,$var)=$var then mouseclick("left" , 504,458,1)$var would just be the pixelnumber RRGGBB if i knew it right?basically i need the program to search an area for a pixel and then click on it.is it possible to do a word search within perameters or is that wishfull thinking?PixelSearch(left,top,right,bottm,color)The color parameter must be in hex or decimal so make sure $var is not in RGB. [center]See the Helpfile[/center] While Alive() DrinkWine(); }[center][/center] Link to comment Share on other sites More sharing options...
Klaatu Posted November 19, 2007 Share Posted November 19, 2007 Well, for one thing you're using pixelsearch as if it returned a boolean value, which it doesn't. It returns an array. Test @error if you want to determine if the color was located or not. My Projects:DebugIt - Debug your AutoIt scripts with DebugIt! Link to comment Share on other sites More sharing options...
sebgg Posted November 19, 2007 Author Share Posted November 19, 2007 Well, for one thing you're using pixelsearch as if it returned a boolean value, which it doesn't. It returns an array. Test @error if you want to determine if the color was located or not.thats usefull but how would it be phrased?$var = PixelGetColor( 504 , 458 )if pixelsearch (400,400,620,475,$var)if not @error then mouseclick("left" , 504,458,1)endif GC - Program to rapidly manipulate DNA SequencesRotaMol - Program to measure Protein Size Link to comment Share on other sites More sharing options...
AquilaChill Posted November 19, 2007 Share Posted November 19, 2007 $var=PixelGetColor(504,458) $var2=PixelSearch(400,400,620,475,$var) If Not @error Then MouseClick("left",$var2[0],$var2[1]) to click on the found color from the PixelSearch of the color from the found pixel at 504,458 i think i made it a bit complicated... im not shure if PixelGetColor gets dec or hex color, but i think it would work with both, though i've always used dec. people are anoying, am i? ;) v2.95 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