Sign in to follow this  
Followers 0
Ibrahim

controlListView "findItem"

8 posts in this topic




Can't you use a loop to continue onto the next match ?

Share this post


Link to post
Share on other sites

How can we help when we don't even know if it's a native ListView or what application it's on... I mean really... vasectomy/unich you choose.

Func _CLVFindItem($hWnd, $sCText, $sLV, $sFindItem, $nItem = -1)
    If ControlListView($hWnd, $sCText, $sLV, 'SelectAll') = 0 Then Return SetError(1, 0, -1)
    Local $nGetCount = ControlListView($hWnd, $sCText, $sLV, 'GetSelectedCount', 0)
    For $iCC = 0 To $nGetCount - 1;$iCC will be the control number
        If ControlListView($hWnd, $sCText, $sLV, 'GetText', $iCC) = $sFindItem Then
            If $nItem = -1 Then Return $iCC
            If $nItem <> $iCC Then Return SetError(2, 0, -1)
        EndIf
    Next
    Return SetError(3, 0, -1)
EndFunc

You could Mod the above... instead of If $nItem = -1 Then Return $iCC you could do If $nItem = -1 Then $sHoldNum = $sHoldNum & @LF

Then where it says Return SetError(3,0,-1) you could return a 1 Dimensional array Return StringSplit(StringTrimRight($sHoldNum, 1), @LF)

(Before anyone comments on $sHoldNum = $sHoldNum vs $sHoldNum &= ... I don't want to confuse him anymore than he's done us.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

why donot you doit on an explorer search results for files named sys on your computer and send me the script

as for me i do understand what u r doing and thanks for ur effort

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  
Followers 0