filter_alias - the FARR alias filter autohotkey helper script
Useful especially if you are a FARR power user (which you should be!

) with a lot of custom aliases.
;filter_alias - FARR alias filter helper script
;WHY?
;When a user has many aliases it can be a hassle to find and edit one of them
;because the FARR options list isn't autosorted and has no filter/searchbox.
;SETUP
;run the script (tip: make it autostart it on boot)
;USAGE
;- open FARR options > aliases and press Ctrl+Space to show a filter box
;- Type in box to filter alias name/regex rows
;- Select a row and press Enter to jump to that row in FARR options
;- Press Esc pr Ctrl+Space again to close filter_alias
;by Nod5 - version 161122
;Listview filter code adapted from
;https://autohotkey.com/boards/viewtopic.php?p=72578#p72578
^Space::
if !
winexist("filter_alias ahk_class AutoHotkeyGUI") return
showgui:
name = filter_alias
FileRead, f
, %A_MyDocuments%\DonationCoder\FindAndRunRobot\AliasGroups\MyCustom\myaliases
.alias
f := StrReplace(f, "</AliasText>", "")
f := StrReplace(f, "</Regex>", "")
xarr := []
xarr2 := []
gx := cx+wx, gy := cy+wy
{
xali := xreg := "" ;clear vars for new alias
if xali
and (xreg
or InStr(A_LoopField, "<Results>") ) ;stop at Result if no Regex {
LV_Add("", xali
, xreg
), xarr
.push
(xali
) , xarr2
.push
(xreg
) xali := xreg := "" ;clear vars for new alias
}
}
return
search:
For key, val In xarr
{
If (search == "")
Else
If InStr(val
, search
) or InStr(xarr2
[key
], search
) ;match }
Return
PgDn::
Down::
if !(contr == "Edit1")
else
return
Enter::
send % seldo ? seldo : seltext
return