Jump to content

_GUICtrlTreeView_FindItem and _GUICtrlTreeView_ClickItem in Autoit not working as expected


Cod
 Share

Recommended Posts

I am automating Eclipse IDE in a remote windows 10 system. I have used Windows Remote Desktop in Mac to connect to the windows system. In this automation, I need to search for "QueueManagers" in a SysTreeView32 and right-click it. There is another folder called "QueueManagersClusters" below QueueManagers. When I use RDP through Mac to connect to the windows system, I am able to click "QueueManagers" and right-click it. But when I use RDP through a Lenovo system to connect to the windows system, it clicks "QueueManagersClusters" instead of "QueueManagers".

I have used the below code:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GuiTreeView.au3>

WinActivate("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE")

Sleep(1000)

Local $hWnd = ControlGetHandle("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE", "", "SysTreeView321")
;MsgBox(0, "Handle", $hWnd)
Sleep(1000)

Local $searchText = "QueueManagers"
$hItemFound = _GUICtrlTreeView_FindItem($hWnd, $searchText)
;MsgBox(0, "Result", $hItemFound)

If $hItemFound Then
    Sleep(1000)
    _GUICtrlTreeView_ClickItem($hWnd, $hItemFound)
    _GUICtrlTreeView_ClickItem($hWnd, $hItemFound, "right")

    Send("{DOWN}")
    Send("{DOWN}")
    Send("{DOWN}")
EndIf

stackoverflow.thumb.png.e8972ccfb02a327a43340af37595cbe8.png

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...