Insolence Posted January 8, 2005 Share Posted January 8, 2005 I can't do ANYTHING (events wise) while a while loop is running. I've tried to recieve any messages inside the specific while loop: While $InGameCheck[0] <> 16579640 AND $InGameCheck[1] <> 16579640 AND $InGameCheck[2] <> 16579640 $InGameCheck[0] = PixelGetColor(517, 458) $InGameCheck[1] = PixelGetColor(565, 462) $InGameCheck[2] = PixelGetColor(610, 452) Sleep(5) $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then MsgBox("","","") WEnd I've tried to make an AdLib:AdlibEnable ( "CheckEvents", 100 ) Func CheckEvents() $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then MsgBox("","","") EndFunc What am I doing wrong? "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
jpm Posted January 8, 2005 Share Posted January 8, 2005 What do you mean by I can't do ANYTHING? I assume you have a Gui creation above, so if you click on the right upper cross of the window you get your message box for your PixelGetColor the x,y wil get according to PixelCoordMode. so I assume your 3 pixel are never the color you look for. Link to comment Share on other sites More sharing options...
Insolence Posted January 8, 2005 Author Share Posted January 8, 2005 (edited) Well, I mean nothing receives and event. And yes, it does detect the pixels and move onto the rest of the script, but while it's in the loop it doesn't detect any events. EDIT - I think it's: Opt("GUIOnEventMode", 1), let me play with this and see if that was the problem. Yeah, that was it. Thanks Edited January 8, 2005 by Insolence "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. 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