Gammon Forum
Entire forum
MUSHclient
Lua
Triggers & ANSI/XTERM colors
Triggers & ANSI/XTERM colors
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Grace
(2 posts) bio
|
Date
| Thu 13 Dec 2012 08:14 PM (UTC) |
Message
| I did search but I might have missed something, so if his is elsewhere, by all means let me know.
I am trying to set up proper spawn windows. Everything works as far as getting a triggered line to the spawn window, and getting the spawn text sent back to the main world. That's fine.
The part I can't figure out is how to do all of this with ANSI/XTERM colors intact. If I abandon the trigger itself enirely, I can try just getting the last line of output and looping like this:
while i<=n do
NoteColourRGB(spawn,GetStyleInfo(line,i,14),GetStyleInfo(line,i,15))
text=GetStyleInfo(line,i,1)
Tell(spawn,text)
i=i+1
end
This works fine, except that the only way GetStyleInfo works is off of line numbers, and with word-wrap on, one chat message can easily be two lines, sometimes more. (I'm not talking about multiple lines sent from the MU*, I'm talking about lines the client has broken up because of length.) I can't figure out any way to determine just which output lines that trigger represents, or any way to just take the trigger input and get the color information from that.
Is there something I'm missing, here? Is this just impossible? It doesn't seem like it should be this complicated. | top |
|
Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Date
| Reply #1 on Thu 13 Dec 2012 08:38 PM (UTC) Amended on Thu 13 Dec 2012 08:39 PM (UTC) by Nick Gammon
|
Message
| |
Posted by
| Grace
(2 posts) bio
|
Date
| Reply #2 on Thu 13 Dec 2012 09:20 PM (UTC) |
Message
| Thank you! I knew there had to be something I was missing. | 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.
9,703 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.