Sign in to follow this  
Followers 0
PumpkinJuice

StringInStr()

2 posts in this topic

I'm having trouble with StringInStr() right now, and I'm not sure really what the problem is:

Does with work for you?

_FillListView()

Func _FillListView()
    $GetItems = _FileListToArray(@DesktopDir)
    For $I = 1 To $GetItems[0]
        If StringInStr($GetItems[$I], ".") = 1 Then Beep(8000, 100)
    Next
EndFunc

Func _FileListToArray($Path, $Filter = "*")
    Local $Search, $File, $FileList[1]
    $Search = FileFindFirstFile($Path & "\" & $Filter)
    While 1
        $File = FileFindNextFile($Search)
        If @error Then ExitLoop
        ReDim $FileList[UBound($FileList) + 1]
        $FileList[0] += 1
        $FileList[UBound($FileList) - 1] = $File
    WEnd
    FileClose($Search)
    Return $FileList
EndFunc   ;==>_FileListToArray

My name is Leilani Swaey! :)

Share this post


Link to post
Share on other sites



Ugh, never mind. 1 is an error return, not success. :)


My name is Leilani Swaey! :)

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