I've got my entire code here:
Code: Select all
/*
AutoHotkey Version: 1.1.26.01
Language: English
Platform: Win XP, Win 7, Win 8.1, Win 10
Author: Delta
Contact information: [email protected]
|=======================================================|
| Hotkeys: |
| None |
|=======================================================|
*/
#NoEnv
#SingleInstance Force
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
Process, Priority,, H
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode, Input
Menu, Tray, Icon, imageres.dll, 63
Gui, Main:-MinimizeBox
Gui, Main:Add, Edit, x0 y25 w750 h20 hwndSearch vSearch gSearchInput,
Gui, Main:Add, Text, x5 y5 w305 h20, Type something in the search bar and watch it filter the options!
Gui, Main:Add, ListView, x0 y50 w750 h315 -Multi +Sort +LV0x1 vLVMain hwndLV
Gui, Main:Show, w750 h365, LV Search
Gui, Main:ListView, LVMain
LV_ModifyCol()
Loop, 10
LV_Add("", A_Index)
; First Parameter is the Listview's associated Variable
; Second Parameter is the Gui Number/Name
List := LV_AddList("LVMain", "Main")
Return
MainGuiClose:
ExitApp
SearchInput:
; First Parameter is the items previously added in LV_AddList()
; Second Parameter is the Search term OR the variable from the edit.
LV_FilterSearch(List, Search)
Return
LV_FilterSearch(Items, Search) {
Loop, Parse, Items, |
If (InStr(A_LoopField, Search))
Return True
Else
Return False
}
LV_AddList(LV_Var, Gui := 1) {
Gui, % Gui ":Submit", NoHide
Gui, % Gui ":ListView", % LV_Var
LV_Delete()
Loop, % LV_GetCount() {
LV_GetText(ItemTxt, A_Index)
Items .= ItemTxt "|"
}
Return Items
}