Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Sending Colored text to the world.

Sending Colored text to the world.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Fri 15 Nov 2002 04:03 PM (UTC)
Message
Once again, after a long time, i bring this subject to light :p
I get the following line when i "look":

<Flg[HSY] Hp[1244/1228] Mana[1713/1713] Wgt[241/350] Go[252,429] Auc[]>The Marketplace

I can make it color the prompt blue using "^\<.*?\>", or i can separate it using "^(\<.*\>)(.*)$" and sending:
%1
%2
to the output. But i need it to be BOTH colored AND separated, i.e. Blue prompt and below it the text... how can i do that? (Using triggers)

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 15 Nov 2002 07:08 PM (UTC)
Message
You would have to use a script, and display the two wildcards in different colours using world.colournote.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Sat 16 Nov 2002 03:03 PM (UTC)
Message
Why is it though, that if i use both triggers, one to colour and one to separate, the second trigger colours the line again? I mean, I have "no change" selected, yet the line that gets displayed is not blue, even if it was colored blue before!

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 16 Nov 2002 09:08 PM (UTC)
Message
Can you post both triggers? I mean to select both, use the "copy" button, and paste them here, so I can comment better.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Sun 17 Nov 2002 12:25 AM (UTC)

Amended on Sun 17 Nov 2002 12:56 AM (UTC) by Nick Gammon

Message
Here they are:


<triggers>
  <trigger
   custom_colour="5"
   enabled="y"
   ignore_case="y"
   keep_evaluating="y"
   match="^\&lt;.*?\&gt;"
   regexp="y"
   sequence="997"
  >
  </trigger>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="^(\&lt;.*?\&gt;)(.*)$"
   omit_from_log="y"
   omit_from_output="y"
   regexp="y"
   repeat="y"
   send_to="2"
   sequence="998"
  >
  <send>%1
%2</send>
  </trigger>
</triggers>


The 1st one seems to have no effect in this context... It colours normally if i disable the splitting one

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 17 Nov 2002 01:02 AM (UTC)
Message
The first one colours the line, but the second one omits it from output, so it is omitting the coloured one from output. Then your second one displays the line in the world note colour.

You really need just one trigger, that doesn't display anything directly. It calls a script that then displays the two wildcards in the desired colour. eg.

sub mytrigger (sname, sline, wildcards)
world.colournote "blue", "black", wildcards (1)
world.colournote "red", "black", wildcards (2)
end sub


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,661 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.