Jump to content

Want to click on item[ i ] in ListView


coghlan
 Share

Recommended Posts

I've stitched together to suggestions from other posters to create a block in an AutoIt script that will:

  • Find item <i> in the list
  • Find the coordinates of the icon's rectangle
  • Left-click in the icon
It appears I need a mix of Controlxxx, ControlListView and _ListView_GetItemRect function calls, but the first problem I've encountered is that I can't locate A3LListView.au3 (not sure if this is a typo).

I used the latest 3.2.10.0 version, not the beta.

Am I on the right track here? Previously, I used the Controlxxx functions without any problem, but a poster suggested using the _ListView xxx functions to get at the rectangle coordinates.

;******************************************************************

#include <A3LListView.au3>

$controlHndl = ControlGetHandle( $winNameAdmin, "", "SysListView323" ) ; Handle (RDR list view)

$targetIndex = _ListView_FindInText( $controlHndl, $rdrName ) ; Index of RDR

ControlListView( $controlHndl, "", "SysListView323", "Select", $targetIndex ) ; Select the item

$rectCoord = _ListView_GetItemRect( $controlHndl, $rdrName )

Link to comment
Share on other sites

A3L, isn't that an extra library from someone on the forum? It isn't distributed with the program, you'll have to download it separately.

Most of those functions are now included in the new version but don't use the same names.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

Hmmm, yeah the other library may be the user's own. I got that example from a Google of _GUICtrlListViewxxxx.

I guess part of the problem is that one needs to keep abreast of the updates to the AutoIt runtime environment. The version I initially downloaded (v3.2.8.1) didn't have any _Guictrllistview_xxxx routines. They seem to exist in the latest download and I can call them (cursor goes God-knows-where, but I'll investigate that tomorrow).

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Hmmm, yeah the other library may be the user's own. I got that example from a Google of _GUICtrlListViewxxxx.

I guess part of the problem is that one needs to keep abreast of the updates to the AutoIt runtime environment. The version I initially downloaded (v3.2.8.1) didn't have any _Guictrllistview_xxxx routines. They seem to exist in the latest download and I can call them (cursor goes God-knows-where, but I'll investigate that tomorrow).

Thanks.

There is a solution provided by Gary in this thread: http://www.autoitscript.com/forum/index.ph...amp;hl=listview

Hope it helps

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