plankton Posted September 16, 2019 Posted September 16, 2019 Hi I want it to search for a specific color in certain area then excute the loop which presses ESC button and stop the loop when the color no longer present in that specific area. Here is the example of my code. But it doesnt stop when color is disappeared. Pixelsearch(511, 455, 678, 501, 0xFFFFFF) If Not @Error Then While 1 Sleep(1000) Send("{ESC}") Pixelsearch(511, 455, 678, 501, 0xFFFFFF) If @Error Then Exitloop
rudi Posted September 16, 2019 Posted September 16, 2019 While IsArray(PixelSearch(100, 100, 300, 300, 0xffffff)) Send("{ESC}") Sleep(1000) WEnd MsgBox(0,"Loop exited","") Earth is flat, pigs can fly, and Nuclear Power is SAFE!
plankton Posted September 16, 2019 Author Posted September 16, 2019 1 hour ago, rudi said: While IsArray(PixelSearch(100, 100, 300, 300, 0xffffff)) Send("{ESC}") Sleep(1000) WEnd MsgBox(0,"Loop exited","") Hi, that's definitely worked, thank you so much.
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