Angel Posted November 3, 2004 Share Posted November 3, 2004 Hi! I've started playing around with the new GUI syntax and I really like it a lot. I seems easier to use than the old syntax. So I'm converting some of my previous GUI's to the new syntax. In the old syntax I had a while loop around a GuiMsg, which seems now to have been replaced by GuiGetMsg. However, on the new syntax I am trying to use the "events" as it seems a cleaner way of doing the work. But this made me wonder if we can use both methods at the same time or do we need to use either one or the other? Also, it is a bit ackward that when using the event method we still need to add a while loop such as: While 1 Sleep(10) Wend It is not a problem but it looks "bad". Maybe there should be a function GuiWaitClose or something like that. Also I wonder if this loop lets the script go "idle" in the same manner that GuiGetMsg does. This is what the help file it says in the Remarks section of GuiGetMsg: "This function automatically idles the CPU when required so that it can be safely used in tight loops without hogging all the CPU." Cheers, Angel Link to comment Share on other sites More sharing options...
Administrators Jon Posted November 4, 2004 Administrators Share Posted November 4, 2004 It will work fine without hogging the CPU. In fact it doesn't work as hard in the onevent mode so should be less CPU overall. You can only be in one mode or the other, not both. The messages from the GUI would quickly get out of sync otherwise. When in the event mode GuiGetMsg will always return 0. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Angel Posted November 5, 2004 Author Share Posted November 5, 2004 Thanks Jon, that clarifies it a lot! Angel 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