I'm wondering if I can instead do an incremental search (https://en.wikipedia.org/wiki/Incremental_search) on those folders and files. Specifically, if my client's name is Jamie Smith, instead of typing "Jamie" or "Smith" in the input box and then pressing ok, can I script a search where if I type in "J" it pulls up all clients with J in their name (e.g. Jamie Smith, Raj Patel, Fred Mijo, etc.), and then if I type in "a" it lists all clients with Ja in their name, and then if I type "m" it lists all clients with jam in their name, etc, with the list narrowing with every additional letter I type.
Here's my current script:
Code: Select all
Gui, Add, ListBox, vListBox_ClList x16 y24 w1600 h1000
Gui, Show,, Test
Gui Font
Gui Add, Button ; a bunch of buttons here
BasePath := "C:\Clients\"
FileList := ""
InputBox, Filter, Directory Filter, Filter?:,, 240, 130, 800, 1
loop, Files, % BasePath "*.*", DR
if InStr(A_LoopFileFullPath, Filter)
FileList .= A_LoopFileFullPath "|"
FileList := RTrim(FileList, "|")
Sort, FileList, D|
FileList := StrReplace(FileList, BasePath)
GuiControl,, ListBox_ClList, %FileList%
Gui, Show
return
; A bunch of subroutines run by pressing buttons here
GuiEscape:
GuiClose:
Return