Administrators Jon Posted June 9, 2004 Administrators Posted June 9, 2004 (edited) Jon: >...1 and 2 are COMPLETELY wrong...What do you mean? Because of the loop or because of $msg = GuiMsg(0)It is wrong because you each time you run GuiMsg you get a new event from the queue (if one is there) and that code basically pauses until there is an event ( GuiMsg() ) and then tries to read another event with GuiMsg(0). Best not to mix the types and remember everytime you call a GuiMsg function you get another event.The GUI keeps track of what was clicked and stores it up (to a point) so when you call a GuiMsg function it simply checks the queue and returns each event. The difference (now) between GuiMsg() and GuiMsg(0) is that if there are no events waiting then GuiMsg() waits UNTIL something happens whereas GuiMsg(0) returns instantly with 0 so that you can do some other processing (adlib/hotkeys) in the meantime. Edited June 9, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
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