buster25 Posted January 9, 2024 Posted January 9, 2024 Hello everyone, sorry for my English. I have this Treewiew and the following code: expandcollapse popup#cs >>>> Window <<<< Title: Asiento Inscripción: Inscripción 1 Class: WindowsForms10.Window.8.app.0.a07288_r60_ad1 Position: -8, -8 Size: 1296, 936 Style: 0x17CF0000 ExStyle: 0x00010100 Handle: 0x0000000001B20C7E >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.a07288_r60_ad1 Instance: 12 ClassnameNN: WindowsForms10.Window.8.app.0.a07288_r60_ad112 Name: treeLVariables Advanced (Class): [NAME:treeLVariables] ID: 40632432 Text: Position: 786, 321 Size: 485, 539 ControlClick Coords: 104, 164 Style: 0x56010000 ExStyle: 0x00000000 Handle: 0x00000000026C0070 >>>> Mouse <<<< Position: 890, 508 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< 52236415: UCEditorView Variables 23935809: UCTreeVariablesView Variables Búsqueda Texto largo Descripción >>>> Hidden Text <<<< #ce Func click() WinActivate("[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1]", "") $hTreeView = ControlGetHandle("", "", "[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1; INSTANCE:12]") ConsoleWrite ( "Handle TreeView " & $hTreeView & @CRLF) _GUICtrlTreeView_Expand($hTreeView, 0, False) $hItemFound = _GUICtrlTreeView_FindItem($hTreeView, "BLOQUE") ConsoleWrite ( "Item Found " & $hItemFound & @CRLF) _GUICtrlTreeView_SelectItem($hTreeView,$hItemFound) _GUICtrlTreeView_ClickItem($hTreeView, $hItemFound, "left", False, 2) EndFunc The code doesn't work, could you help me with it?
ioa747 Posted January 9, 2024 Posted January 9, 2024 (edited) Func click() $hWnd = WinActivate("[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1]", "") ConsoleWrite("$hWnd=" & $hWnd & @CRLF) $hTreeView = ControlGetHandle($hWnd, "", "[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1; INSTANCE:12]") ConsoleWrite("Handle TreeView " & $hTreeView & @CRLF) _GUICtrlTreeView_Expand($hTreeView, 0, False) $hItemFound = _GUICtrlTreeView_FindItem($hTreeView, "BLOQUE") ConsoleWrite("Item Found " & $hItemFound & @CRLF) _GUICtrlTreeView_SelectItem($hTreeView, $hItemFound) _GUICtrlTreeView_ClickItem($hTreeView, $hItemFound, "left", False, 2) EndFunc ;==>click does the console return the values? which ones? Edit: it doesn't look like an ordinary TreeView32 Edited January 9, 2024 by ioa747 I know that I know nothing
buster25 Posted January 9, 2024 Author Posted January 9, 2024 Thanks ioa747. Console returns: "$hWnd=0x00C10E0A Handle TreeView 0x00B902E2 Item Found 0x00000000" and _GUICtrlTreeView_Expand SelectItem and ClickItem as no effect
ioa747 Posted January 9, 2024 Posted January 9, 2024 (edited) try with https://www.autoitscript.com/autoit3/docs/functions/ControlTreeView.htm like $sTViewPath = "one|two|three" Local $aPath = StringSplit($sTViewPath, "|", 1) Local $tmpPath = "" For $i = 1 To $aPath[0] $tmpPath &= $aPath[$i] & "|" ConsoleWrite("$tmpPath=" & StringTrimRight($tmpPath, 1) & @CRLF) ControlTreeView($hWnd, "", $hTreeView, "Expand", StringTrimRight($tmpPath, 1)) ControlTreeView($hWnd, "", $hTreeView, "Select", StringTrimRight($tmpPath, 1)) Sleep(50) Next Edited January 9, 2024 by ioa747 I know that I know nothing
buster25 Posted January 9, 2024 Author Posted January 9, 2024 Thanks, but not work $hWnd = WinActivate("[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1]", "") $hTreeView = ControlGetHandle($hWnd, "", "[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1; INSTANCE:12]") $hItemFound = ControlTreeView ( $hTreeView, "treeLVariables", "[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1; INSTANCE:12]", "GetItemCount" , "#1|#2") ConsoleWrite("Item Found " & $hItemFound & @CRLF) any idea ??
ioa747 Posted January 9, 2024 Posted January 9, 2024 (edited) $hWnd = WinActivate("[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1]", "") $hTreeView = ControlGetHandle($hWnd, "", "[CLASS:WindowsForms10.Window.8.app.0.a07288_r60_ad1; INSTANCE:12]") ControlTreeView ( $hWnd, "", $hTreeView, "Expand" , "#0") ControlTreeView ( $hWnd, "", $hTreeView, "Select" , "#0") Sleep(50) $iItemCnt = ControlTreeView ( $hWnd, "", $hTreeView, "GetItemCount" , "#0") ConsoleWrite("Item Count " & $iItemCnt & @CRLF) Edited January 9, 2024 by ioa747 correction I know that I know nothing
Nine Posted January 9, 2024 Posted January 9, 2024 Some systreeview32 requires x64 “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nine Posted January 9, 2024 Posted January 9, 2024 No just use wrapper x64 #AutoIt3Wrapper_UseX64=y at beginning of script “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nine Posted January 9, 2024 Posted January 9, 2024 Like @ioa747 said, it does not seem to be a standard TreeView, and since nothing works, you may need to use UIAutomation. “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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