; Searches for lines in all alias and remotefiles matching your searchstring.
; I hate it to comment snippets :P
; Contact me if you are not able to use it
; Should work fine on mIRC 6.0 and above
alias scriptsearch {
if ($isid) { return }
if ($len($1)) {
var %x = 1,%o = 0,%@ = @ScriptSearch
if ($window(%@)) { clear %@ }
window -nek0z %@ "Lucida Console" 11
echo $color(info2) %@ Searching for " $+ $1- $+ " in $alias(0) aliasfiles and $script(0) remotefiles
var %x = 1
while ($alias(%x)) {
echo $color(info) %@ Aliasfile: $ifmatch
echo $color(info2) %@ $str(-,30) SOF $str(-,30)
filter -fw " $+ $ifmatch $+ " %@ * $+ $$1- $+ *
echo $color(info) %@ $chr(9) $+ $filtered lines found matching your search string
echo $color(info2) %@ $str(-,30) EOF $str(-,30)
inc %x
}
var %x = 1
while ($script(%x)) {
echo $color(info) %@ Remotefile: $ifmatch
echo $color(info2) %@ $str(-,30) SOF $str(-,30)
filter -fw " $+ $ifmatch $+ " %@ * $+ $1- $+ *
inc %o $filtered
echo $color(info) %@ $chr(9) $+ $filtered lines found matching your search string
echo $color(info2) %@ $str(-,30) EOF $str(-,30)
inc %x
}
echo $color(info) %@ $chr(9) $+ overall %o lines found matching your string " $+ $1- $+ "
echo $color(info2) %@ Finished searching for " $+ $1- $+ "
window -a %@
}
elseif { echo -ag * Please use /scriptsearch <string> }
}
on *:input:@scriptsearch:{ scriptsearch $1- | halt }