Jump to content
Sign in to follow this  
n9mfk9

ControlListView an right click?

Recommended Posts

n9mfk9

hi all is there a way after you use ControlListView to sleect a item is there an way to have ControlListView do a right click i used window info tool x205 y is 89 but the mouse dos not go the the creact spot thanks gor all help

Dim $objshell;$test
$objshell = ObjCreate('shell.application')
$objshell.ControlPanelItem("ncpa.cpl")
;Sleep(1000)
WinWaitActive("Network Connections", "")
WinSetState("Network Connections","",@SW_MAXIMIZE)
$test = ControlListView("Network Connections", "FolderView","SysListView321","FindItem","Wireless Network Connection")
ControlListView("Network Connections", "FolderView","SysListView321","select",$test)
Sleep(1000)
;ControlClick("Network Connections", "FolderView","SysListView321","right",1)
$pos = ControlGetPos("Network Connections", "FolderView","SysListView321")
;MsgBox(0, "Window Stats:", "POS: " & $pos[0] & "," & $pos[1]  )
MouseClick("right",$pos[0],$pos[1])

Share this post


Link to post
Share on other sites
Thatsgreat2345

check auot Auto3Lib in the scrips and scraps

Share this post


Link to post
Share on other sites
SmOke_N

Controls use Client coords (Opt("MouseCoordMode", 2))

Personally, I would have tried ControlClick() with the "right" button option, or if as thatsgreat said, the Auto3Lib by PaulIA may have something even better.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Thatsgreat2345

Paulia just showed how to click an item in a listview on his last page

$hList = ControlGetHandle("Propriétés de Connexion au réseau local", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")
_ListView_ClickItem($hList, 3)

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.