Nothing2Lose Posted August 29, 2010 Share Posted August 29, 2010 Hi, How can I use both in a single script??? I want to use WM_COMMAND to process message. So all loop in my script must be removed ... Perhap i have to use "loop message"... Thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 29, 2010 Moderators Share Posted August 29, 2010 Nothing2Lose,Can you please give an example where you fail to do what you want when using WM_COMMAND and MsgBox? At the moment I do not understand your problem - I have used both in the same script without problem, but obviously not in the same way as you! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Nothing2Lose Posted August 29, 2010 Author Share Posted August 29, 2010 Ah... 1, I'm using WM_COMMAND... When detecting an error, i show a MsgBox... And... All data in my list box has been cleared ... 2, I couldn't use GUICtrlCreateMenu (and MenuItem) with WM_COMMAND, so i used menu udf, but i have got an error (i posted in expand menu topic)... o:) 3, More... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 29, 2010 Moderators Share Posted August 29, 2010 Nothing2Lose,We need code, not just a list of what went wrong! I'm using WM_COMMAND... When detecting an error, i show a MsgBoxIf you are using MsgBox WITHIN the WM_COMMAND message handler, could I remind you of the comment in the Help file for GUIRegisterMsg:"Warning: blocking of running user functions which executes window messages with commands such as "Msgbox()" can lead to unexpected behavior, the return to the system should be as fast as possible !!!"If you are doing this, then it is unsurprising that you are having problems. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Nothing2Lose Posted August 29, 2010 Author Share Posted August 29, 2010 I read that command, all loop in my script caused unexpected behavior, so i had to remove all loop except MsgBox()... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 30, 2010 Moderators Share Posted August 30, 2010 Nothing2Lose,For the third, and last, time of asking - please post the code that is giving you the problem. No code = no help! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 30, 2010 Moderators Share Posted August 30, 2010 Code isn't really needed to offer a suggestion in this situation. Create a global variable. Set the initial value to false. Where you have your MsgBox(), instead mark your global as true ( ready to process ). In your main loop, check if the global is true. If global is true, do MsgBox(). After MsgBox() mark global as false again. I use this method with all of my message blocking functions I need to run when a registered message/callback event is fired. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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