justsomenoob Posted July 30, 2022 Share Posted July 30, 2022 I used the example for _GUICtrlTreeView_ClickItem and the debug shows single and double clicks as working. Then i removed all the stuff i don't want from the example. I also removed the WM_NOTIFY function or my example wouldn't work. Now it runs but my example only works with single click (,2 is enabled). Something to note is i had to put the full path to WM_NOTIFY.au3 or it came up with an error. Here is my script expandcollapse popup#include <C:\Program Files\AutoIt3\Examples\Helpfile\Extras\WM_NOTIFY.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiTreeView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #include <TreeViewConstants.au3> Global $g_idTreeView Example() Func Example() GUICreate("TreeView Click Item", 400, 300) Local $iStyle = BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS) $g_idTreeView = GUICtrlCreateTreeView(2, 2, 396, 268, $iStyle, $WS_EX_CLIENTEDGE) Local $A = GUICtrlCreateTreeViewItem("A", $g_idTreeView) Local $A01 = GUICtrlCreateTreeViewItem("A01", $A) Local $A02 = GUICtrlCreateTreeViewItem("A02", $A) Local $B = GUICtrlCreateTreeViewItem("B", $g_idTreeView) Local $B01 = GUICtrlCreateTreeViewItem("B01", $B) Local $B02 = GUICtrlCreateTreeViewItem("B02", $B) GUISetState(@SW_SHOW) Local $iMsg _WM_NOTIFY_Register() _GUICtrlTreeView_BeginUpdate($g_idTreeView) _GUICtrlTreeView_EndUpdate($g_idTreeView) _GUICtrlTreeView_ClickItem($A01, "left", False, 2) While 1 $iMsg = GUIGetMsg() If $iMsg = $A01 Then WinActivate ("Untitled - Notepad") Send ("A{ENTER}") EndIf If $iMsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Link to comment Share on other sites More sharing options...
Nine Posted July 30, 2022 Share Posted July 30, 2022 _WM_NOTIFY_Register() will not create a WM_NOTIFY function. You need to provide one in order for it to work. In fact do not use _WM_NOTIFY_Register(), it is useless, just register your own function with GUIRegisterMsg($WM_NOTIFY, WM_NOTIFY). Note that the function is not in double-quotes, it is a better way to reference a function. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
justsomenoob Posted July 30, 2022 Author Share Posted July 30, 2022 I have decided to go with a standard menu. That option is a pile of crap with too much extra work just for a double click. Thanks anyway 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