Jump to content
Sign in to follow this  
LuuQuangICT

How to send double click to ListViewItem from another Application

Recommended Posts

LuuQuangICT

Hello! I have application with a ListView Control. I want to send double click to any item of this listview.

I was search on google but no result which i want to do. Please help me!!!

1111.png

Share this post


Link to post
Share on other sites
LuuQuangICT

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

Share this post


Link to post
Share on other sites
InunoTaishou

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.