Looking at it again, I should've been more precise.
In JInSim, I've created a helper class that helps an add-on creator do common things easily. One that I've implemented is the ability to send a multi-colored message. There are some interesting issues related to which type of LFS application you're connected to, but that's for a future thread
The multi-colored message is send as a String with escape sequences to change colors. I've just used a caret (^) and the number that corresponds to the color when you're typing it in. So for instance:
helper.sendMultiColoredMessage("^1Red and ^4Blue");
will send the message "Red and Blue" where "Red and" will be red and "Blue" will be blue. You get the picture.
To implement this, I iterate through the String character by character and test for the escape sequences, then send the appropriate character out using the "SCH" type packets.
In my test program, I send out an MST packet, then the SCH packets in quick succession. The SCH packets don't get sent correctly unless I have a 500ms delay before I start sending them. There are some other technicalities, but that's the gist of it. Victor, I think what you've said fits my scenario. The MST and SCH packets I send are all done through the "talk" interface of the client. In other words, before I start sending the messages, I send an SCH packet that types the letter "T" beforehand.
--
Rob