mIRC Homepage
Posted By: Davey on ^*:text:*:#|?:{ - 29/12/02 04:06 PM
I dunno if this has ever been asked, but I'm one for editing the on text events that happen in the channel and query.
Problem is, as I've noticed before, it doesn't tend to keep more than one space.
For example, on here. It doesn't keep the 2/4/6 space indent when we're pasting code.
It doesn't do that on text events either.
Instead of:
Code:
<Davey> alias test {
<Davey>   if ($1 == $null) {
<Davey>     return [Error]: Missing parameter.
<Davey>   }
<Davey>   else {
<Davey>     return $1
<Davey>   }
<Davey> }

It comes out as:
Code:
<Davey> alias test {
<Davey> if ($1 == $null) {
<Davey> return [Error]: Missing parameter.
<Davey> }
<Davey> else {
<Davey> return $1
<Davey> }
<Davey> }

It misses the spaces. I want the custom on text event to keep the spaces. How would I go about this?
If I'm not making any sense I'll try to explain it again later.

Dave.

PS: If you know what I'm going on about and wondered how I kept the spaces above without them going like they did in example 2; I used $chr(160) instead of $chr(32).
Posted By: Collective Re: on ^*:text:*:#|?:{ - 29/12/02 04:10 PM
Thats just the way mIRC works, and I don't think there is a way around it, except using nbs.
Posted By: Davey Re: on ^*:text:*:#|?:{ - 29/12/02 04:10 PM
Nbs?

Dave.
Posted By: Collective Re: on ^*:text:*:#|?:{ - 29/12/02 04:12 PM
Non breaking spaces (ascii 160, you already used it..)
Posted By: Saturne Re: on ^*:text:*:#|?:{ - 29/12/02 04:13 PM
Ah, yes, that's pretty annoying for events known as slaps (which doesn't include only true slaps !) such as roses, and other teddy bears.
Posted By: starbucks_mafia Re: on ^*:text:*:#|?:{ - 29/12/02 09:54 PM
Non-breaking spaces aren't helpful when someone is pasting code though since the code won't work without standard spaces. When it comes to code the better way round this is to put double  (that's bold control codes) after each space, that way the code can be copied and it will work properly (providing the user doesn't press Ctrl as he copies it).
© mIRC Discussion Forums