Jump to content
Sign in to follow this  


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?



Edited by CMJ

Share this post

Link to post
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)

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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.