mIRC Home    About    Download    Register    News    Help

Print Thread
#3957 29/12/02 04:06 PM
Joined: Dec 2002
Posts: 8
D
Davey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 8
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).

#3958 29/12/02 04:10 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Thats just the way mIRC works, and I don't think there is a way around it, except using nbs.

#3959 29/12/02 04:10 PM
Joined: Dec 2002
Posts: 8
D
Davey Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Dec 2002
Posts: 8
Nbs?

Dave.

#3960 29/12/02 04:12 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Non breaking spaces (ascii 160, you already used it..)

#3961 29/12/02 04:13 PM
Joined: Dec 2002
Posts: 21
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 21
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.


DNWT.net Coalition of irc networks
#3962 29/12/02 09:54 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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).


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard