palbertario Posted October 9, 2013 Share Posted October 9, 2013 Hello, I am trying to check an item on a treeview after obtaining the position of the item. Unfortunately the autofind doesn't see the text inside the treeview so I cannot just search for the text of the item I want checked. I am new at autoit, but I am not sure why the item is not getting checked int he code below. I obtain the position and even use the hashtag. I think there may be something wrong with the way I use && and "". Could someone take a look at the code I put below to determine why? Thank you! ----- -----Code ------ #include <Array.au3> Local $array[4] = ["apple", "orange", "banana", "tomato"] Local $sSearch = InputBox("test", "Select the product you wish to use.") ;If @error Then Exit Local $iIndex = _ArraySearch($array, $sSearch, 0, 0, 0, 1) If @error Then MsgBox(0, "Not Found", '"' & $sSearch & '" was not found in the array.') Else MsgBox(0, "Found", '"' & $sSearch & '" was found in the array at position ' & $iIndex & ".") EndIf ControlTreeView("test", "", "[CLASS:SysTreeView32; INSTANCE:1]", "Check", "#"&$iIndex&) Link to comment Share on other sites More sharing options...
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