Valik Posted September 21, 2004 Posted September 21, 2004 In addition to that lot I was pondering a new notify option that instead of sending a message code causes GetMsg to execute a specifed function - like the functions in VB that can be attached to buttons and things. Should be easy enough, but that's just a pondering.Jon, I don't know how feasible this idea is, but something like this could be one way of doing this $control = GuiCreateControlOfSomeType() ; $control is a handle, basically GuiSetCallback($control, "MyCallback") Func MyCallback() ; Do Stuff EndFunc Maybe add some @Macros like @Param1 - @Param32 or something for having a clean way to get special parameters passed along which could be helpful in some cases (For example, was a control single clicked or double clicked?). Maybe @Paramn would have some use with Call and HotKeySet, too (@Param1 = key, @Param2 = mod1, @Param3 = mod2, et cetera). Just some thoughts.
Administrators Jon Posted September 21, 2004 Author Administrators Posted September 21, 2004 Jon, I don't know how feasible this idea is, but something like this could be one way of doing this $control = GuiCreateControlOfSomeType() ; $control is a handle, basically GuiSetCallback($control, "MyCallback") Func MyCallback() ; Do Stuff EndFunc Maybe add some @Macros like @Param1 - @Param32 or something for having a clean way to get special parameters passed along which could be helpful in some cases (For example, was a control single clicked or double clicked?). Maybe @Paramn would have some use with Call and HotKeySet, too (@Param1 = key, @Param2 = mod1, @Param3 = mod2, et cetera). Just some thoughts. That's pretty much what I was thinking. It would be easy to add the variant type into the internal GUI code and a string or number or array message could be returned to GuiMsg() which could then decide if it's a "normal" message for the message pump or if it should "call" another function. It's all doable. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
jpm Posted September 22, 2004 Posted September 22, 2004 to @Valik and @ Jon I like the callback approach Jon do you take care of it?
Administrators Jon Posted September 22, 2004 Author Administrators Posted September 22, 2004 (edited) This is looking pretty cool I must say. I like the way you've handled menu creation that is the pretty much same for app, tray and context menus. Very nifty. I'm implementing it now, but the changes I am making are: - In the CreateBlankIcon function you can get rid of all that code with a couple of memset() functions - Removing the blocking GetMsg modes (all to be merged into a single GetMsg() mode) - Removing the GuiWaitClose stuff - Removing the whole "timeout" thing, it's always bugged me, and now there is no blocking mode it can be done with normal TimerInit() Edited September 22, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
CyberSlug Posted September 22, 2004 Posted September 22, 2004 Just wondering: Are debug features planned for the next release? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
jpm Posted September 22, 2004 Posted September 22, 2004 This is looking pretty cool I must say. I like the way you've handled menu creation that is the pretty much same for app, tray and context menus. Very nifty. I'm implementing it now, but the changes I am making are: - In the CreateBlankIcon function you can get rid of all that code with a couple of memset() functions - Removing the blocking GetMsg modes (all to be merged into a single GetMsg() mode) - Removing the GuiWaitClose stuff - Removing the whole "timeout" thing, it's always bugged me, and now there is no blocking mode it can be done with normal TimerInit() <{POST_SNAPBACK}>Thanks Jon, That's why we need you
Administrators Jon Posted September 22, 2004 Author Administrators Posted September 22, 2004 Just wondering: Are debug features planned for the next release? Nutster is looking at it but not seen him in a while so must be busy job hunting. I'm not - and never have been - that bothered about the debug stuff, it is only going to mess up my neat source code anyway. If it happens, it happens, but it's not a priority for me. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted September 22, 2004 Author Administrators Posted September 22, 2004 I've uploaded a first stab at the gui changes into the unstable directory. I've also uploaded a guiexamples.zip file with a few of the examples that JP uses to show usage. I'll update the zip file with more as I convert them into new stylee. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
SlimShady Posted September 22, 2004 Posted September 22, 2004 I'm playing with jpm's test version... I wanted to try out the GUICtrlCreateTreeView control, but the example doesn't work. Just wanted to let you know...
Valik Posted September 22, 2004 Posted September 22, 2004 I've uploaded a first stab at the gui changes into the unstable directory. I've also uploaded a guiexamples.zip file with a few of the examples that JP uses to show usage. I'll update the zip file with more as I convert them into new stylee. <{POST_SNAPBACK}>Awesome. I hate to see how much work this is going to be (I have quite a few GUI scripts to update) but I liked how the new layout looked, so this should hopefully be much easier to use.
CyberSlug Posted September 22, 2004 Posted September 22, 2004 I guess it's time for me to look at writing some gui conversion scripts Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Administrators Jon Posted September 22, 2004 Author Administrators Posted September 22, 2004 I guess it's time for me to look at writing some gui conversion scripts I've just been updating examples and I must say I'm prefering it so far. Not having to remember which GUiMsg mode to use is nice. Could be tricky to convert though. The only thing I'm still not decided on is whether or not to force the default notify mode to "notify" rather than "close", as for any gui with more than one button you are probably want to know when it is clicked and react to that rather than letting the Gui close and then working out afterwards why it closed. Hmmm. Don't know. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Valik Posted September 22, 2004 Posted September 22, 2004 I vote do away with the mode altogether. Since you're already forced into using a message loop to handle messages, if you want a button to close it, then it's not like it requires a lot of effort to have: If $msg = $myExit Then Quit()
Josbe Posted September 22, 2004 Posted September 22, 2004 Wow! Thanks, GUI Devs.!The new improvements are great...more functions, but cool! Great work! Now, it's time to conversion...PS->(Helpfile): I noticed that 'GUIPeekMsg' it's undocumented... AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
jpm Posted September 22, 2004 Posted September 22, 2004 @jon do you intend to upload the installation setup in instable
Administrators Jon Posted September 23, 2004 Author Administrators Posted September 23, 2004 I vote do away with the mode altogether. Since you're already forced into using a message loop to handle messages, if you want a button to close it, then it's not like it requires a lot of effort to have: If $msg = $myExit Then Quit() I initially thought that this was a bad idea as if you had a simple gui with 10 buttons and you wanted any of them to close the gui it would involve more code in the messageloop part. But then I realized that even if the notify/close mode made it easier to do the message loop you would _still_ have to do a Guiread() afterwards to work out which button was pressed and then you would have to have a big if/select statement anyway. So yeah, unless anyone can think of a reason to keep the notify mode then I'll remove it. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted September 23, 2004 Author Administrators Posted September 23, 2004 Wow! Thanks, GUI Devs.! The new improvements are great...more functions, but cool! Great work! Now, it's time to conversion... PS->(Helpfile): I noticed that 'GUIPeekMsg' it's undocumented... It doesn't exist anymore. Just GUIGetMsg(). Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Administrators Jon Posted September 23, 2004 Author Administrators Posted September 23, 2004 @jon do you intend to upload the installation setup in instable I wasn't home last night, so didn't have broadband. Should be able to upload an installer tonight with any changes we do today. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
jpm Posted September 23, 2004 Posted September 23, 2004 I wasn't home last night, so didn't have broadband. Should be able to upload an installer tonight with any changes we do today. <{POST_SNAPBACK}>THanks Have a good working day ...
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