How to invoke a sub from a repeat trigger

Posted by Twrx on Wed 10 Dec 2003 07:41 PM — 3 posts, 12,896 views.

#0
Is there a possibility to multiple invoke a script by
a single line ?
Following Trigger matches and colourize the Words, but
script is just called once per matching line.

<trigger match="([A-Z][a-z]*)"
script="ScrExaAddWord"
name="TrExaGetWord1"
group="TrGrpUntFarbe"
enabled="y"
keep_evaluating="n" <---- same result with "y"
regexp="y"
repeat="y"
sequence="100"
custom_colour="6">
</trigger>

So long, Twrx.
Australia Forum Administrator #1
MUSHclient batches up triggers so that the script is called once per matching line, even if there are multiple matches for that line.

However in your case the simple thing would be to have the script look at the matching line (the 2nd argument to the trigger) and then do whatever needs doing multiple times in the single script call.
Australia Forum Administrator #2
In any case, you don't want "keep_evaluating" but "repeat" (which I notice you are using anyway). "keep_evaluating" means evaluate *other triggers* for the same line. "repeat" means to keep evaluating the same regular expression on the same line.