mIRC Home    About    Download    Register    News    Help

Print Thread
Best way to space pad a var for sending to msg? #266207 20/10/19 07:01 PM
Joined: Jul 2007
Posts: 53
B
beer Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Jul 2007
Posts: 53
I've been trying to figure out a better way to text with spaces. Until now I've always added spaces with a space and two ctrl-k's (bold) afterwards. Then rinse & repeat for however many spaces I wanted to pad. I know simply adding $chr(32)'s won't work cuz msg/notice will just strip them out. I read you can achieve this by using a bvar but I couldn't get that to work either.

Is there any way other than using space+ctrl-k+ctrl-k to do this?

Re: Best way to space pad a var for sending to msg? [Re: beer] #266208 20/10/19 08:47 PM
Joined: Jul 2006
Posts: 3,584
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,584
There's no way to do that, the control + k workaround is ugly but it's there.. you can also use $chr(160) instead of $chr(32), which is a non breakable space, which does the job.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Best way to space pad a var for sending to msg? [Re: Wims] #266209 20/10/19 08:50 PM
Joined: Jul 2007
Posts: 53
B
beer Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Jul 2007
Posts: 53
That's what I figured. Thanks for the clarity!

Re: Best way to space pad a var for sending to msg? [Re: beer] #266210 20/10/19 09:16 PM
Joined: Jul 2006
Posts: 3,584
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,584
http://xise.nl/mirc/wiki/doku.php/doku.php?id=spaces
http://xise.nl/mirc/wiki/doku.php/doku.php?id=spacealt

Some nice articles about spaces and their preservation, it's an old article mentioning old rules ($chr(160), with unicode, is now working 100% of time, before, a font may have a different character.) but is still relevant

Last edited by Wims; 20/10/19 09:21 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net