Jump to content

_GUICtrlListView_SetItemSelected


CMJ
 Share

Recommended Posts

EDIT: Figured it out. Sorry for wasting your time. Just in case others end up in this situation the code that worked is this:

$iVar = 2
_GUICtrlListView_SetItemSelected ($ListView, Number($iVar))

Can any one tell me why this works:

_GUICtrlListView_SetItemSelected ($ListView, 2)

But this doesn't:

$iVar = 2
_GUICtrlListView_SetItemSelected ($ListView, $iVar)

I need to store the selected item in a list view and then reset it after I run a function. Seems like it should work but the SetSelectedItem function does not seem to accept a variable.

If this is as intended, is there another way to make this work?

Thanks

cj

Edited by CMJ
Link to comment
Share on other sites

I suppose it's write like that ?

For $i = 0 To _GUICtrlListViewGetItemCount($Listview)
    If StringInStr(_GUICtrlListView_GetItemTextString($Listview, $i, -1), GUICtrlRead($_input)) > 0 Then _
    _GUICtrlListView_SetItemSelected($Listview, $i)
Next

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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