|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Mon Jan 07, 2008 1:08 am
trigger assistance please, #sapy #say |
I'm looking for help with the following trigger please.
It's a chatline trigger I use to capture tells, and place them in a new window.
I tried using #sayp, but then it wouldn't return a new line, and would continue to the end of my screen, which is where I keep the zmud mapper, so I would end up missing it all.
I switch it to use #say, but now I have a newline everytime, which makes the chat window less efficient. I tried playing around with #CR, but whatever I did, I just couldn't get it working properly.
Here is the code I'm using.
[Trigger]
(?:> )?((?:You tell [A-Z][a-z]+|[A-Z][a-z]+ tells you): .*)$
:chats:#SAY {%cr%ansi( white)"["%time( "h:nn:ss")"] "%ansi( hi, yellow, blue)"%1"}
:tells:#SAY {%cr%ansi( white)"["%time( "h:nn:ss")"] "%ansi( hi, yellow, blue)"%1"}
^( .*)$ Loop line 3 :chats:#SAY {%ansi( hi, yellow, blue)" %1"}
It works great, aside from the extra line on every tell, but I'd rather have the extra line, than the screen width capture.
Any assistance would be wonderful, please and thankyou.
Here is the actual export from zmud.
#REGEX {(?:> )?((?:You tell [A-Z][a-z]+|[A-Z][a-z]+ tells you): .*)$} {:chats:#SAY {%cr%ansi( white)"["%time( "h:nn:ss")"] "%ansi( hi, yellow, blue)"%1"};:tells:#SAY {%cr%ansi( white)"["%time( "h:nn:ss")"] "%ansi( hi, yellow, blue)"%1"}}
#COND {^( .*)$} {:chats:#SAY {%ansi( hi, yellow, blue)" %1"}} {looplines|param=3|prompt|regex} |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 07, 2008 3:39 am |
I'm afraid I don't fully understand your problem. Perhaps a screenshot would help? Upload them to imageshack.us.
The #say command automatically prints on a new line, so you don't need the %cr at the start, and it also automatically appends another CR. That seems to solve your problem unless I'm misunderstanding.
If you want is to word-wrap your chats and tells windows, then click on the window, press the Prefs button on the toolbar and on the Word Wrap options, disable Auto Wrap and set the wrap column and wrap width of your choosing. Save, and you're done.
If you want something more complex, please give some more explanation. |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Mon Jan 07, 2008 6:05 am didn't work |
I tried the word wrap, but unfortunately it doesn't work... :( I will copy/paste what I see in my window to give you an idea.
[0:01:23] You tell yourself: this is a test
[0:01:26] You tell yourself: this is a test
[0:02:06] You tell yourself: this is a longer test just to show you what I'm talking
about, have to type more so that it will word wrap, so that you can
get the full effect. This is using #say, which automatically adds
the command return to each line.
Now, if I use #sayp, I get the following
[0:01:23] You tell yourself: this is a test
[0:01:26] You tell yourself: this is a test
[0:02:06] You tell yourself: this is a longer test just to show you what I'm talking about, have to type more so that it will word wrap, so that you can get the full effect. This is using #sayp, which doesn't automatically add the command return to each line.
Now, in example A, I don't like the blank line after each tell, but example B, the text on the right half of the tells are covered by the zmud mapper window.
I simply want the wrapped text after 80chars, without the added carrier return.
Hope that helps?
And again, I tried using the wrap feature in prefs, it didn't help. |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Mon Jan 07, 2008 6:07 am |
Hmm... forums are set to a fixed width.. Think if you will, in example B, the 2nd line is on the same line as the 1st, so instead of having 3 lines, I'd have 2. If it was a 4 line tell, it's be 2 lines using #sayp
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 07, 2008 8:49 am |
Sounds like your MUD has server-side word wrapping on. Turn it off.
|
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Mon Jan 07, 2008 12:19 pm |
Or if that isn't possible go with your first way of doing things but make a trigger in your tells window to gag a blank line. Something like #TRIGGER {^$} {#GAG}
|
|
_________________ Taz :) |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Tue Jan 08, 2008 2:24 am |
argh.. why aren't my replies going through :(
gag didn't work... it would gag everything
I'm sure there's some way to do it. My thought was to add a %cr at the beginning of the loop lines.. but for whatever reason, each time I tried to add it, it would merely add it to the body of the text, and not actually add the carrier return.... |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Tue Jan 08, 2008 2:44 am |
Generally I'm doing my channel captures with #substitute.
You could read up on it and see if using that would solve your problems.
As a sidenote, while using substitute, where for instance Someone is telling you: %1 and %1 is the long speech pattern (more than one line long), it captures it perfectly.
I'm not sure if thats any help, though.
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Tue Jan 08, 2008 6:42 am |
Hmm, I apologize, but I couldn't get the sub command to work..
Is it possible you have an example I can look at? |
|
|
|
Loftaris Adept
Joined: 24 Aug 2004 Posts: 277
|
Posted: Tue Jan 08, 2008 6:45 am |
Oh, you've gotta be kidding me.......
In a freak accidental brainwave, I realized my entire problem.
I changed #say back to #sayp, and simply added a %cr to the equation... This time, in the proper spot. Now, it captures it just fine.... sigh
I added %cr%ansi to the loop lines.. So, it doesn't add the extra carrier everytime, only when the loop lines fires.
thanks for your replies everyone, I hope this helps anyone else in the future. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|