jpm Posted September 27, 2004 Posted September 27, 2004 In some of your examples in the docs you have things like this: While GuiGetMsg ()>0; to wait a click if GuiRead () = $nAdd then GuiCtrlSetData ($nList,"text entry "& $n) if GuiRead() = $nClear then GuiCtrlSetData ($nList,"") Wend is this the reason for the GuiRead/Last click thing? I don't think this method should be used as the extra modes I've added to GuiGetMsg make this loop impractical anyway. I feel that the best general purpose newbie/advanced loop is: While 1 $msg = GuiGetMsg() if $msg = $GUI_EVENT_CLOSE Then ExitLoop ; Select statement or IF statements If $msg = $nAdd Then ... If $msg = $nClear Then ... Wend With the extra options for GuiGetMsg (returning arrays of info) and also with multi windows you need to check not only if GUI_EVENT_CLOSE was received but also which window sent the message. (And it's only 2 lines longer which is not a heavy price to pay for consistency ) <{POST_SNAPBACK}>I think my code is like that due to the first gui implementation. Now is time to switch tothe new GUI. I am waiting the GuiCtrlSetCallBack/GUICtrlSetOnEvent...
Administrators Jon Posted September 28, 2004 Author Administrators Posted September 28, 2004 I think my code is like that due to the first gui implementation. Now is time to switch tothe new GUI. I am waiting the GuiCtrlSetCallBack/GUICtrlSetOnEvent... Internally I'm going to change the Event to return a variant, then in GuiGetMsg() you can check the return to see if it's number (normal event) or a string. The string will contain the callback function to call. Should be very easy to implement callback then. 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