Alright i have a 3 triggers to match a line that can vary, sometimes it has only one part, or two, or three. something like.
you see (a star|an asteroid|a comet) or
you see (a star|an asteroid|a comet),(a star|an asteroid|a comet) or even
you see (a star|an asteroid|a comet), (a star|an asteroid|a comet), and (a star|an asteroid|a comet)
what i want to do is, whenever theres a "an asteroid" to send to the mud, "stop" then set a variable Asteroids with plus one, well i would also like it to set 2 other varibles depending on what its gets, and no matter which order and such
For one thing, you could do that with one trigger. I gather they are regular expressions? Just use the "0 or 1" quantifier, or do it with squiggly brackets, like this:
If you try this out, it will match all three cases, and by using named wildcards the three things it finds are in wildcard "a", "b", and "c".
Then you could do something like this in your (send to) script:
if "%<a>" = "an asteroid" then
asteroids = asteroids + 1
elseif "%<a>" = "a comet" then
comets = comets + 1
elseif "%<a>" = "a star" then
stars = stars + 1
end if
if "%<b>" = "an asteroid" then
asteroids = asteroids + 1
elseif "%<b>" = "a comet" then
comets = comets + 1
elseif "%<b>" = "a star" then
stars = stars + 1
end if
' ditto for c
after adding this another of my alias, script doesn't work now wondering why
Error number: -2146827284
Event: Execution of line 1 column 5
Description: Expected ';'
Line in error:
sub OnStar(name, output, wildcs)
quick note i also get
Error number: -2146827256
Event: Execution of line 1 column 1
Description: Invalid character
Line in error:
%0 = The computer reports the presence of some debris
Called by: Immediate execution
At present timers cannot expand variables directly, although I will look at adding that. However you could do it with "send to script" and something like this: