[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Sending Colored text to the world.

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Sending Colored text to the world.
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sun 17 Nov 2002 01:02 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Sun 17 Nov 2002 12:25 AM (UTC)  quote  ]

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!
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sat 16 Nov 2002 09:08 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Sat 16 Nov 2002 03:03 PM (UTC)  quote  ]
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!
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Fri 15 Nov 2002 07:08 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Fri 15 Nov 2002 04:03 PM (UTC)  quote  ]
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!
[Go to top] 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.


1,292 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]