Jump to content

Using _GUICtrlListView_FindItem,


md9
 Share

Recommended Posts

Hi,

This is my 3rd day using Autoit.

I am trying to capture a row in ListView. I can access individual list item using GUICtrlListView_GetItem. The list view contains multiple columns.

For example:

ColValue1 ColValue2 ColValue3 .....

$handle1 = ControlGetHandle($hwin,"","WindowsForms10.SysListView32.app.0.2df9fa81");

MsgBox(4160,"Info","Number of Columns:"&_GUICtrlListView_GetColumnCount($handle1)) ;(returns 14)

$aItem = _GUICtrlListView_GetItem($handle1, 1)

MsgBox(4160, "Information", "Item 2 Text: " & $aItem[3]) ; (Works!)

$tInfo = DllStructCreate($tagLVFINDINFO)

DllStructSetData($tInfo, "Flags", $LVFI_PARAM)

DllStructSetData($tInfo, "Param", "ColValue1")

$iI = _GUICtrlListView_FindItem ($handle1, -1, $tInfo) ; (Doesnt work.)

How do I get to this row with colvalue1. Am I missing something here?

Thankyou

Link to comment
Share on other sites

Hi,

This is my 3rd day using Autoit.

I am trying to capture a row in ListView. I can access individual list item using GUICtrlListView_GetItem. The list view contains multiple columns.

For example:

ColValue1 ColValue2 ColValue3 .....

$handle1 = ControlGetHandle($hwin,"","WindowsForms10.SysListView32.app.0.2df9fa81");

MsgBox(4160,"Info","Number of Columns:"&_GUICtrlListView_GetColumnCount($handle1)) ;(returns 14)

$aItem = _GUICtrlListView_GetItem($handle1, 1)

MsgBox(4160, "Information", "Item 2 Text: " & $aItem[3]) ; (Works!)

$tInfo = DllStructCreate($tagLVFINDINFO)

DllStructSetData($tInfo, "Flags", $LVFI_PARAM)

DllStructSetData($tInfo, "Param", "ColValue1")

$iI = _GUICtrlListView_FindItem ($handle1, -1, $tInfo) ; (Doesnt work.)

How do I get to this row with colvalue1. Am I missing something here?

Thankyou

Welcome to the AutoIt forums md9 :)

Look up the functipon _GUICtrlListView_GetItemText, I think that is what you need.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Welcome to the AutoIt forums md9 :)

Look up the functipon _GUICtrlListView_GetItemText, I think that is what you need.

Thanks Martin,

I was able to do it with _GUICtrlListView_FindText() function. Cheers. :(

Link to comment
Share on other sites

Welcome to the AutoIt forums md9 :)

Look up the functipon _GUICtrlListView_GetItemText, I think that is what you need.

Thanks Martin,

I was able to do it with _GUICtrlListView_FindText() function. Cheers. :(

Now that it is solved, is it possible to select multiple rows in a list view.. to simulate a CTRL+click on different items.

- md

Link to comment
Share on other sites

md9

is it possible to select multiple rows in a list view

Yes, just don`t use a $LVS_SINGLESEL style when ListView control creating.

From help:

default (-1) : $LVS_SHOWSELALWAYS, $LVS_SINGLESEL

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