select and replace instead of deleteline
Posted: Fri May 07, 2010 8:55 am
My mud sends me info like
Highlighted for easier viewing. Each different colour is a packet. Each quote above is given in 1 line from the mud. And it can go up to 6-8 packets in 1 line.
So i have triggers to capture each packet of info courtesy of tsuujin already, however, the mud doesn't always send a \n at the end of the packet, so sometimes other mud outputs are attached to the end of the packet.
Like
I've tried selectString and replace, but when nothing is attached to the end of the packet, then i'm left with a blank line. and this can get really spammy. not to mention ugly.
deleteLine doesn't leave a blank line, but gags the whole thing including You punch him in the face!.
Is there anyway to solve this?
Thanks
or#K%00001008AAC15:41#K%00001011AAF1.5 days
The general pattern is #K% followed by a bunch of info. So each #K% represents 1 piece of info that the mud sends.#K%00001007BAE0.10
Highlighted for easier viewing. Each different colour is a packet. Each quote above is given in 1 line from the mud. And it can go up to 6-8 packets in 1 line.
So i have triggers to capture each packet of info courtesy of tsuujin already, however, the mud doesn't always send a \n at the end of the packet, so sometimes other mud outputs are attached to the end of the packet.
Like
How should i go about removing the packets without affecting the "You punch him in the face!" ?#K%00001008AAC15:41#K%00001011AAF1.5 daysYou punch him in the face!
I've tried selectString and replace, but when nothing is attached to the end of the packet, then i'm left with a blank line. and this can get really spammy. not to mention ugly.
deleteLine doesn't leave a blank line, but gags the whole thing including You punch him in the face!.
Is there anyway to solve this?
Thanks