bbaffert Posted March 15, 2005 Share Posted March 15, 2005 (edited) If ($Net > 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out) This stops my program from working when the situation becomes greater than 2. I really need the script to hit this $Out and the wait until the $Net becomes <2 and then do the same controlclick. What would be the next line to get it to pause after making this click and then make the click again when the $Net < 2? I know the comeback line will be the one below but I am having a problem with how to get the script to go into a waiting mode until the number gets below 2 again and then make the click again. I am guessing that there is a line or some code that goes between these two that will make it wait but not sure what that is or how to do it. If ($Net < 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out) Thanks for your time. Edited March 15, 2005 by bbaffert Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 15, 2005 Share Posted March 15, 2005 (edited) If ($Net > 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out)This stops my program from working when the situation becomes greater than 2. I really need the script to hit this $Out and the wait until the $Net becomes <2 and then do the same controlclick. What would be the next line to get it to pause after making this click and then make the click again when the $Net < 2?I know the comeback line will be the one below but I am having a problem with how to get the script to go into a waiting mode until the number gets below 2 again and then make the click again. I am guessing that there is a line or some code that goes between these two that will make it wait but not sure what that is or how to do it.If ($Net < 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out)Thanks for your time.<{POST_SNAPBACK}>Nested While statements....While 1 Sleep(10) If ($Net > 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out) While $net > 2 Sleep(10) WEnd If ($Net < 2 and (PixelGetColor(13,572)=16777215)) then ControlClick($name, "", $Out) WEndAlthough, based on your code.... This button gets clicked no matter what. Somehow, I think something else is missing, but that timing loop is probably what you need. Edited March 15, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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