Jump to content

How to send double click to ListViewItem from another Application


Recommended Posts

Oh! I was try it but it don't work!!! Please help me :( 

Note: The application have listview is application made by C#, it isn't GUI made by autoit :(

#include <MsgBoxConstants.au3>
#include <GuiListView.au3>

MsgBox($MB_SYSTEMMODAL, "", ControlListView("Form1", "", "WindowsForms10.SysListView32.app.0.bf7771_r11_ad11", "GetItemCount"))
_GUICtrlListView_ClickItem("198482", 1, "left", False, 2)

 

1.png

Link to comment
Share on other sites

The handle you're giving the _GUICtrlListView_ClickItem is "198482". That doesn't look like any handle I've ever seen in windows.

#include <MsgBoxConstants.au3>
#include <GuiListView.au3>

Global $hWndWindow = WinGetHandle("Form1")
Global $hWndLv = ControlGetHandle($hWndWindow, "", "WindowsForms10.SysListView32.app.0.bf7771_r11_ad11")

MsgBox($MB_SYSTEMMODAL, "", ControlListView($hWndWindow, "", $hWndLv, "GetItemCount"))
_GUICtrlListView_ClickItem($hWndLv, 1, "left", False, 2)

Should do it.

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...