etaliken Posted December 26, 2011 Share Posted December 26, 2011 I started some days ago with Autoit and now i want to crate a profile which searchs in an area for the color read. I wachted for such an command and found this: ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 ) If Not @error Then MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) EndIf Is it possible with this command to create an skript like this: 1. Search in Area for Red 2. If Red is not found do this: for example push "A" Jump to 1 and check again for red 3. If red is found do this: for example push "B" _______________ I Hope i described what i want and that you can help me. If it is possible plz write me how i can make such an skript. Thanks for your time Etaliken Link to comment Share on other sites More sharing options...
FaridAgl Posted December 26, 2011 Share Posted December 26, 2011 Ofc. While True ; Find a pure red pixel in the range 0,0-20,300 $coord = PixelSearch(0, 0, 20, 300, 0xFF0000) If @error Then ; The Color doesn't found, do the stuffs here ;and the script will run again coz it's in a while loop Else ; We found the color, do what ever you want here. ExitLoop ; to exit the while loop EndIf WEnd ;~ More codes here that execute when the color found and the ExitLoop command executed. http://faridaghili.ir Link to comment Share on other sites More sharing options...
etaliken Posted December 26, 2011 Author Share Posted December 26, 2011 I will try and give a feedback thanks anyways 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