CMJ Posted September 4, 2010 Posted September 4, 2010 (edited) 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 September 4, 2010 by CMJ
wakillon Posted September 4, 2010 Posted September 4, 2010 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.0 - WIN 8.1 X64 - Other Example Scripts
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now