MariusN Posted January 9, 2010 Share Posted January 9, 2010 I hope someone can share some light on this. the variable "$GUI_RUNDEFMSG" is often used as a RETURN-TO function and works in conjunction with "$fDblClk"....What i would like to know is, nowhere can i find to WHAT this variable is assigned to, but it works. I admit I'm no fundi on this, but it seems to me it has something to do with the "DllStructGetData"...where can i read up more about the $GUI_RUNDEFMSG and also "$fDblClk" if it IS related to the DllStructGetData? (not how to use it, but how it actually works) Link to comment Share on other sites More sharing options...
gte Posted January 9, 2010 Share Posted January 9, 2010 I don't see $GUI_RUNDEFMSG in my help file, and I'm not sure I really understand what you wrote. Are you asking how $GUI_RUNDEFMSG interacts with $fDblClk?I hope someone can share some light on this. the variable "$GUI_RUNDEFMSG" is often used as a RETURN-TO function and works in conjunction with "$fDblClk"....What i would like to know is, nowhere can i find to WHAT this variable is assigned to, but it works.I admit I'm no fundi on this, but it seems to me it has something to do with the "DllStructGetData"...where can i read up more about the $GUI_RUNDEFMSG and also "$fDblClk" if it IS related to the DllStructGetData? (not how to use it, but how it actually works) HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script Link to comment Share on other sites More sharing options...
MariusN Posted January 9, 2010 Author Share Posted January 9, 2010 I don't see $GUI_RUNDEFMSG in my help file, and I'm not sure I really understand what you wrote. Are you asking how $GUI_RUNDEFMSG interacts with $fDblClk? Here is a small snippet from another member expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiListView.au3> Global $fDblClk = False $hGUI = GUICreate("Test", 500, 500) $ListView = GUICtrlCreateListView("Entry Name|Category", 5, 75, 195, 280, BitOR($LVS_SORTASCENDING, $LVS_SINGLESEL)) $hLV_Handle = GUICtrlGetHandle(-1) GUICtrlCreateListViewItem("Name 2|Category 2", $ListView) GUISetState() GUIRegisterMsg($WM_NOTIFY, "MY_WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch If $fDblClk Then $fDblClk = False MsgBox(0,"Double Clicked",_GUICtrlListView_GetItemText($hLV_Handle, _GUICtrlListView_GetSelectedIndices($hLV_Handle))) EndIf WEnd ; React to double clicks on ListView Func MY_WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return If DllStructGetData($tNMHDR, 1) = $hLV_Handle Then If DllStructGetData($tNMHDR, 3) = $NM_DBLCLK Then $fDblClk = True EndIf $tNMHDR = 0 Return $GUI_RUNDEFMSG EndFunc if you look at the "Return $GUI_RUNDEFMSG"...where does the $GUI_RUNDEFMSG come into play as its only mentioned once ? Link to comment Share on other sites More sharing options...
MariusN Posted January 9, 2010 Author Share Posted January 9, 2010 The variable "$GUI_RUNDEFMSG" is defined in the include file "GUIConstantsEx.au3". Global Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG' O ok...thanks a bunch. Tell me, is there a place where a person can read about all the "hidden" functions in the "includes" and what they do? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 9, 2010 Moderators Share Posted January 9, 2010 Hi guys,That is my code MariusN is quoting, so I hope you do not mind me butting in! You can find out about $GUI_RUNDEFMSG on the Help file page for GUIRegisterMsg. Basically it allows AutoIt to run it's internal handler for a message once you have finished with it. If you do not want the internal handler to run, just Return 0.The $fDblClk was an internal flag in the script, so you will find no reference in the Help file! I often use flags in the message handlers because of this warning (from the same page in the Help file:"Warning: blocking of running user functions which executes window messages [...] can lead to unexpected behavior, the return to the system should be as fast as possible !!!"So rather than run a long function in the message handler itself, I use it to set a flag to "True" and then run the function from my While...WEnd loop (I ususally use GetMessage mode so there is always one about somewhere!) using something like this:If $fFlag = True Then $fFlag = False ; to prevent it running every time! Function() EndIfI hope that is clear. Please ask if you are still unsure about anything. M23 Professor_Bernd 1 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 Melba23 Posted January 9, 2010 Moderators Share Posted January 9, 2010 Thanubis,The key words are "as fast as possible". It all depends what you have in your 30 lines that count. A Switch statement on its own will not cause a problem as it only runs the lines associated with the valid condition. It is what those few lines do that matter - I have seen a case where the handler ran a function that took over 30 secs (mostly Sleep()!) to complete = guaranteed crash every time! Using OnEvent mode is not a big problem if you want to try the flag idea - just use an Adlib function to check at intervals if the flag is set. 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 Melba23 Posted January 9, 2010 Moderators Share Posted January 9, 2010 Thanubis,If it does not crash.....it is fast enough! Seriously, I do not think there is any need to worry unless you put in MsgBoxes or seriously long functions like the 30secs one I mentioned earlier.I just try and keep any message handler as short as possible - if I can do the necessary things outside then I do. 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...
gte Posted January 9, 2010 Share Posted January 9, 2010 I don't have that, nor have I ever seen it, care to attach it to the forum temporarily?There should be a file in the AutoIt installation directory named "UDFs3.chm". That is the UDF help file. It lists all of the documented UDF functions just like the regular help file lists the standard functions. HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 9, 2010 Moderators Share Posted January 9, 2010 gte,Help for the UDFs is included in AutoIt3.chm. The smaller Autoit.chm holds the builtin functions only.Like you, I have never seen or heard of UDFs3.chm until now - I can only imagine it was included in a much earlier version of AutoIt. 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...
gte Posted January 9, 2010 Share Posted January 9, 2010 Agreed Melba, that would have been awesome!I'm going to have to update my version now gte,Help for the UDFs is included in AutoIt3.chm. The smaller Autoit.chm holds the builtin functions only.Like you, I have never seen or heard of UDFs3.chm until now - I can only imagine it was included in a much earlier version of AutoIt. M23 HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 9, 2010 Moderators Share Posted January 9, 2010 Thanubis,Apologies. I have not looked in the folder for ages and never realised how many different Help files there were! I just run a script (what else? ) which starts AutoIt3Help.exe and get it all in one place!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...
MariusN Posted January 9, 2010 Author Share Posted January 9, 2010 What a mouth full....Thanks m23 Link to comment Share on other sites More sharing options...
gte Posted January 11, 2010 Share Posted January 11, 2010 I did the same this morning, doh!Thanubis,Apologies. I have not looked in the folder for ages and never realised how many different Help files there were! I just run a script (what else? ) which starts AutoIt3Help.exe and get it all in one place!M23 HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script 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