Newlines & Omitting Them

Posted by Aidyn.Hartfire on Thu 11 Sep 2008 09:20 AM — 4 posts, 18,848 views.

USA #0
Alright, this is the fourth time I've tried to make this post so hopefully it goes through. At any rate, I've been mulling over this idea for quite some time now but I can't seem to find a solid way to execute it. Essentially what I want to do is take any given newline, make it go "bye-bye", and replace it with a ColourNote. I'll give an example of a bit of the code for the newline (without the omission, of course).



  <trigger
   enabled="y"
   expand_variables="y"
   group="Diagnosis"
   ignore_case="y"
   match="^\&quot;(.*?) leg lashed in thorny vines\.\&quot;$"
   name="Vines"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>if "%1" == "right" then
   SetVariable ("vines_right", "1")
   ColourNote ("violet", "black", "&lt;&lt;&lt;RIGHT LEG IN VINES: WRITHE&gt;&gt;&gt;")
else
   SetVariable ("vines_left", "1")
   ColourNote ("violet", "black", "&lt;&lt;&lt;LEFT LEG IN VINES: WRITHE&gt;&gt;&gt;")
end--if</send>
  </trigger>


Essentially, as you can tell, as this receives the newline it determines whether or not it is the right or left leg which is tangled, then produces the ColourNote: <<<RIGHT LEG IN VINES: WRITHE>>>. Now, all of that works, however omitting a newline keeps the trigger from being recognized and therefore stops the note from being produced. This, obviously, is counter-productive to the idea behind doing this. I tried sending the data to a new window via the redirector method, however, this stops the note from registering. Does anyone have any idea as to how I can work my way around the problem?
#1
Unless I've misunderstood what you're trying to do (which sounds to me like you want to substitute the line), you want to add the omit_from_output="y" attribute and change your send_to from 12 to 14.
USA #2
I could absolutely kiss you right now. I swear I've tried doing that before, but it didn't work right. Maybe I didn't have everything set up just the right way. Anyhow, thanks! You've just helped me take one giant leap towards completing my system. Take care and happy adventures!
Amended on Thu 11 Sep 2008 12:05 PM by Aidyn.Hartfire
Australia Forum Administrator #3
Quote:

if me = "confused" then


Unfortunately, your signature won't compile <evilgrin>.

It should read:


if me == "confused" then