mIRC Homepage
Posted By: maroon $submenu label containing a colon? - 23/04/07 04:04 AM
Is it possible to have $submenu return labels containing a colon? I was making a script to create a menu showing the text of the last several times someone used by nick in channel, but anytime the label contains a colon within the sentence, the line bombs because "something:something :halt" isn't a valid menu line.

thanks
Posted By: RusselB Re: $submenu label containing a colon? - 23/04/07 04:06 AM
Try using
Code:
$+(something,$chr(58),something) : halt

Posted By: maroon Re: $submenu label containing a colon? - 23/04/07 04:11 AM
I can't get it to work, i was using

return .label %variable_containing_sentence :halt

and it was bombing whenever the %variable contained a colon.
Posted By: RusselB Re: $submenu label containing a colon? - 23/04/07 04:19 AM
That makes it a lot more difficult. I'll see what I can come up with, but nothing is jumping to the front of my mind.
Posted By: maroon Re: $submenu label containing a colon? - 09/04/18 05:02 PM
I was having problem getting a script displaying a colon as part of a label returned by $submenu, so I searched to see if anyone else had the same issue, and discovered it was only me having the problem a decade ago on an unrelated script.

Since there was no solution given last time, I'm bumping this with my current solution. My current script was displaying a menu listing invalid commands reported by the server, which could include strings containing colons, but could also be $style(1) and $style(2) which were getting interpreted even if they were inside $unsafe().

To deal with the colon issue, I displayed them as $chr(42889), which looks like the colon. I think my prior solution pre-unicode was displaying the colons as semi-colons.
I also began the label with $chr(160), which allowed $style() to be displayed instead of interpreted.
© mIRC Discussion Forums