mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try using
Code:
$+(something,$chr(58),something) : halt


Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.


Link Copied to Clipboard