The real problem is with the real bad way your using * to try and match to tokens sepeatered by "×", the matching system is placed under huge stress to try and match up what you want becuase of what "*" means, it doesnt stop at the next "×" but tries matching for none or all of the remaining text.
You should have made your data matchable using SPACE as the token sperator (using "×" to replace spaces in any token if need be) this would have allowed you to match using "&" for any word match.
here is an example.
alias testfilter2 {
var %ticks = $ticks
var %w = @ChannelList1 | window %w | clear %w
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
aline -p %w Network1 #channel1 <NOKEY> OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF DESCRIPTION×OF×SOMETHING OFF
window @TMP | clear @TMP
; var -s %filter = $makewm2(23,$+(1 *,$chr(215),15 ON,$chr(215),21 OFF)) | ; aka 1 *×15 ON×21 ON
; ^ I dont see the purpose of setting token one to * as thats what it was to begin with anyway. So i dont do it (but if it was done speed isnt overly different)
var %filter = $makewm2(23,$+( $chr(215),15 ON,$chr(215),21 OFF)) | ; aka ×15 ON×21 ON
///echo -s filter -wwc %w @TMP %filter
filter -wwc %w @TMP %filter
echo -s $calc(($ticks - %ticks) / 1000)
}
alias makewm2 {
var %t = $chr(215), %a = $asc(%t), %total = $1, %toks = $2-
var %i = 1, %wm = * | while (%i < %total) { var %wm = & %wm | inc %i }
var %total = $numtok(%toks,%a), %i = 1 | while (%i <= %total) { tokenize 32 $gettok(%toks,%i,%a) | var %wm = $puttok(%wm,$2-,$1,32) | inc %i }
return %wm
}
However I can see that trhis might be hard to do considering it would appear you have alot of script already completed.
here is another option.
alias testfilter3 {
var %ticks = $ticks
var %w = @ChannelList1 | window %w | clear %w
aline -p %w Network1×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×D SCRIBE×OFF
aline -p %w Network2×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×DE CRIBE×OFF
aline -p %w Network3×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×OFF×OFF×OFF×DES RIBE×OFF
aline -p %w Network4×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×OFF×OFF×DESC IBE×OFF
aline -p %w Network5×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×OFF×DESCR BE×OFF
aline -p %w Network6×#channel1×<NOKEY>×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×OFF×ON×OFF×OFF×OFF×OFF×DESCRI E×OFF
window @TMP | clear @TMP
var %filter = $makewm1(23,$+(1 *,$chr(215),15 OFF,$chr(215),21 OFF)) | ; aka 1 *×15 ON×21 ON
///echo -s filter3 -wwc %w @TMP %filter
filter3 -wwc %w @TMP %filter
echo -s $calc(($ticks - %ticks) / 1000)
}
alias filter3 {
if (-* iswm $1) { var %switches = $1, %source = $2, %destination = $3, %filter = $+(×,$4-,×) }
else { var %switches, %source = $1, %destination = $2, %filter = $+(×,$3-,×) }
var %filter = $replacex($left($right($replace(%filter,×*×,×&×,×*×,×&×),-1),-1),$chr(32),$chr(215),$chr(215),$chr(32))
var %filter = $+($iif(($right(%filter,1) == &),$left(%filter,-1),%filter),*)
;
var %tempspace = $+(@temp.,$ticks,$mid($r(1000000000,1999999999),2))
savebuf %source %tempspace
bread %tempspace 0 $file(%tempspace).size &binvar
breplace &binvar 32 215 215 32
bwrite %tempspace 0 -1 &binvar
window -h %tempspace
loadbuf -r %tempspace %tempspace
filter $replace($+(-,%switches,$iif(c !isin %switches,c)),--,-) %tempspace %tempspace %filter
savebuf %tempspace %tempspace
if ($file(%tempspace).size) {
bunset &binvar
bread %tempspace 0 $file(%tempspace).size &binvar
breplace &binvar 32 215 215 32
bwrite %tempspace 0 -1 &binvar
loadbuf -r %tempspace %tempspace
}
filter $remove($+(-ww,$iif(c isin %switches,c),$iif(p isin %switches,p)),x) %tempspace %destination
.remove %tempspace
window -c %tempspace
}
The above uses a altered filter system that does the following.
Adjusts the original filter of ex "*×*×SOMETHING×*×*" to "& & SOMETHING & *"
Creates a workspace window/file name
Saves the source window to a file
loads that file as a binvar
swaps " " for "×" and viseversa in the binvar
saves the binvar back to the file
loads the file into a temp window
filters the tempwindow into itself to get the result set
saves the temp window to a file
if the file isnt zero in size then
.. loads the file as a binvar'
.. swaps " " for "×" and viseversa in the binvar (returning it to the original)
.. saves the binvar back to the file
.. loads the file into the temp window
finally filters the temp window into destination window
and cleans up
** I dont believe this couldnt be fooled but i think it would help u out on the long delay ones **