Sign in to follow this  
Followers 0
coghlan

App list view returns to item <n>. I want item <i>

4 posts in this topic

My 3rd-party app remembers the sort order and item number displayed at the top of a list view, so the next person that opens that window gets the same "snapshot" in the list view.

Here's my problem:

1) The list items have a graphic on the left-hand side of each row (what is this?) which can only be checkmarked by placing the mouse cursor over the graphic and left-clicking (graphic changes to a red checkmark). I want to do this to item <i>, which may or may not be in the window, as the app restores what what there the last time someone closed the window.

2) I need the list item to be visible in the list view in order to left-click the graphic. I was able to do this by sending a bunch of PAGE UP to jump to item 1, and then PAGE DOWN until I know the item is in the window, and position the mouse cursor on the left side of its row. This is somewhat kludgey and could be simplified. I need to do this in many of the app's list view controls.

3) A much better method would be to tell the list view to display item <i> in the top row, and just left-click at a fixed coordinate.

How can I control which list item goes in the top row of the application's list view control?

Share this post


Link to post
Share on other sites



Can I just use _GUICtrlListSetTopIndex() and, if so, do I have to use the numeric control ID or can I use CLASSNN?

Share this post


Link to post
Share on other sites

Use latest beta:

1)

_GUICtrlListView_FindText()

_GUICtrlListView_GetItemRect() --> $iPart = 1 - The bounding rectangle of the icon or small icon

MouseClick() or ControlClick()

2) _GUICtrlListView_EnsureVisible()

Share this post


Link to post
Share on other sites

Ah, I see, you don't even care about the index. I was using the index, but to help me PAGE DOWN to the item. This is better. Thanks.

The item doesn't seem to respond to Select commands (but clicking it will select it), and the app requires the user to left-click the item's icon for the app to accept it (icon changes to a check mark), i.e. roughly +8,+35 from the upper left-hand corner of the item's rectangle. What does "1 - The..." give me, and is the rectangle info useful before calling EnsureVisible? Will the item appear in the top row, or just "any" visible location in the control?

I'm using AutoIt's interpreter, which I assume is Visual Basic (I'm more of a C++/C## type), so how can I access the rectangle info so I can use it to Mouse/Control click 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  
Followers 0