mike1212 Posted April 5, 2005 Share Posted April 5, 2005 Hello I looked at the sleeps delays and cant find away to make this statement work! I do not know if it is even possible, Any Ideas/ If $color = 473924 Then sleep Til $color <> 473924 EndIf What I am trying to do is pause the script, that runs in the same window, until it see a change in that window. Thank You Mike1212 Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 5, 2005 Share Posted April 5, 2005 I guess you have to do something like this: If $color = 473924 Then Do ;Some code here Until $color <> 473924 EndIf Or If $color = 473924 Then While 1 sleep(10) If $color <> 473924 Then Exitloop WEnd EndIf Link to comment Share on other sites More sharing options...
mike1212 Posted April 5, 2005 Author Share Posted April 5, 2005 (edited) I guess you have to do something like this:If $color = 473924 Then Do ;Some code here Until $color <> 473924 EndIfOrIf $color = 473924 Then While 1 sleep(10) If $color <> 473924 Then Exitloop WEnd EndIf<{POST_SNAPBACK}>Hello Wb-FreeKillThat command works however, it not what I need, it exits the script totally if not the correct pixel then I need to restart it.let me restate myselfI need to pause the script, til it sees the correct pixel color then runthe script.Thank You Mike1212 Edited April 5, 2005 by mike1212 Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted April 5, 2005 Share Posted April 5, 2005 Hello Wb-FreeKillThat command works however, it not what I need, let restate myselfI need to pause the script, til it sees the correct pixel color then runthe script.Thank You Mike1212<{POST_SNAPBACK}>sees it, what u meen?, like when the color is under the curser, or when looking for the pixel color? Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 While 1 If $color = 473924 Then ;Insert code here Else Sleep(10000) EndIf Wend You could also do this... While 1 While $color <> 473924 Sleep(10000) Wend ;Rest of code here Wend Or While 1 Do Sleep(10000) Until $color = 473924 ;Rest of code here Wend As you can see you have many options qq Link to comment Share on other sites More sharing options...
mike1212 Posted April 5, 2005 Author Share Posted April 5, 2005 sees it, what u meen?, like when the color is under the curser, or when looking for the pixel color?<{POST_SNAPBACK}>The script runs in a cont. loop, what is happing, it is unable to correctlyselection all bottons because they pop up at random and the set sleep timmers I have are interfering with 100% reliability.So I want to pause the script totally until the pixel change happens then run the scriptIt is 100% on the money at the start. It only screws up later into it. So by having it start fresh everytime it should be 100%.Mike1212 Link to comment Share on other sites More sharing options...
mike1212 Posted April 5, 2005 Author Share Posted April 5, 2005 (edited) While 1 If $color = 473924 Then ;Insert code here Else Sleep(10000) EndIf WendYou could also do this...While 1 While $color <> 473924 Sleep(10000) Wend ;Rest of code here WendOrWhile 1 Do Sleep(10000) Until $color = 473924 ;Rest of code here WendAs you can see you have many options<{POST_SNAPBACK}>I agree with your codes, but what I am failing to see, is the script will sleep for10 seconds or what ever its set for, what will make it start at moments notice.example Sleep(5000) the script may need to act in 1 second whats happens then?This is the problem.Thanks Mike1212 Edited April 5, 2005 by mike1212 Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 (edited) For some strange reason I thought it might kill the sleep(), let me ponder for a bit...Edit: I am so stupid lol, you dont have to have an Else in thereWhile 1 If $color = 473924 Then ;Insert code here EndIf Wend Edited April 5, 2005 by burrup qq Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 See my edited post above . qq Link to comment Share on other sites More sharing options...
mike1212 Posted April 5, 2005 Author Share Posted April 5, 2005 See my edited post above .<{POST_SNAPBACK}>Thank YouI think that has it ,by placing the pixel ck. above the while 1it is also pausing the whole script within the loop were as before it was not. I didnt realize you were able to place code outside the loop, so I see you can now.If I have this wrong let me know? Thank You.Mike1212 Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 Nope, thats right. Once a loop finish's it will simply continue the code, if there is no code it will exit. qq Link to comment Share on other sites More sharing options...
mike1212 Posted April 5, 2005 Author Share Posted April 5, 2005 Nope, thats right. Once a loop finish's it will simply continue the code, if there is no code it will exit.<{POST_SNAPBACK}>I see your point, I ran the code, it didnt start the script until the pixel was correct but once in the loop it continued to run so I will need to place the code multi times with the loop. And remove it from above While 1.That I think should fix it.Mike1212 Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share Posted April 5, 2005 If you have any more problems, you know who to ask . qq Link to comment Share on other sites More sharing options...
mike1212 Posted April 6, 2005 Author Share Posted April 6, 2005 If you have any more problems, you know who to ask .<{POST_SNAPBACK}>Thank You BurrupThe program is singing, happily.It no longer misses a beat.Mike1212 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