ForsakenGod Posted November 16, 2009 Share Posted November 16, 2009 Hello, I want to say i am new to autoit and its great features . I ve tried alot today but idk why i cant fix it . I am trying to make an program that would search for 2 colors in a given area . If there is 1 color spotted it should sleep for x time and check if the color is still there if yes sleep 2 more times and then perform an action if the color changes it should perform an action . Anyone who can help me with it ? I dont know how to make an search for 2 colors it would be on small area so i dont really care about speed of search just please explain me how to do it step by step . And also if someone would be so kind i would like to know how to make more complicated conditions like if the color is there and pixelsearch found the color and i ve slept the x time etc . Also is there possibility to force the programm to check for the change of color while it sleeps ? Here is what i ve done so far i dont know whats bad but it gives me error . Started with AutoIt today $color = PixelSearch(1537 ,22 ,1549 ,515) if $color = 0xFFFF00 Then MouseClick("left",102,55,1,0) Sleep( 4000) MouseClick("left",1048,729,1,0) else if $color = 0x8000FF Then MouseClick("left",23,59,1,0) Sleep( 4000) MouseClick("left",1048,729,1,0) If anyone could help me it would be great. Thank you for your time. Unreal Link to comment Share on other sites More sharing options...
Bert Posted November 16, 2009 Share Posted November 16, 2009 You need to review how If/Then/EndIf works. Review the helpfile example. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
JohnOne Posted November 16, 2009 Share Posted November 16, 2009 Also you may want to review the pixelsearch function. You need to offer it a colour to look for PixelSearch( 0, 0, 20, 300, 0xFF0000 ) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ForsakenGod Posted November 17, 2009 Author Share Posted November 17, 2009 ok ill try it out ay other suggestions ? Link to comment Share on other sites More sharing options...
Kiroshi Posted November 17, 2009 Share Posted November 17, 2009 don't forget to end your if statements Link to comment Share on other sites More sharing options...
jvanegmond Posted November 17, 2009 Share Posted November 17, 2009 (edited) ForsakenGod, keep your questions about one particular topic in one thread.http://www.autoitscript.com/forum/index.php?showtopic=105565 Edited November 17, 2009 by Manadar github.com/jvanegmond 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