Sign in to follow this  
Followers 0
n9mfk9

ControlListView an right click?

4 posts in this topic

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



check auot Auto3Lib in the scrips and scraps

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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  
Followers 0