mIRC Home    About    Download    Register    News    Help

Print Thread
Spaces gone missing... :( #177416 24/05/07 03:33 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Code:
If I type: /say     Thumbs Up! 
It becomes: <Gomp> Thumbs Up!


Code:
If I type:     Thumbs Up! 
It becomes: <Gomp>      Thumbs Up! 


See my problem?

Code:
I wish it would be like: <Gomp>      Thumbs Up! 
 ... if I type: /say     Thumbs Up! 


But for some reason the damn thing removes all my 'spaces' ...

Like if I use /thumb:

Code:
alias Thumb {
  /say   ___
  /say  ( ((
  /say   \ =\
  /say  __\_ `-\ 
  /say (____))(  \------  
  /say (____)) _  
  /say (____))
  /say (____))____/----'
  /say     Thumbs Up! 
}




It becomes:

Code:

24 17:30:24 <Gomp>  ___
24 17:30:24 <Gomp>  ( ((
24 17:30:24 <Gomp>  \ =\
24 17:30:24 <Gomp> __\_ `-\
24 17:30:24 <Gomp> (____))( \------
24 17:30:24 <Gomp> (____)) _
24 17:30:24 <Gomp> (____))
24 17:30:24 <Gomp> (____))____/----'
24 17:30:24 <Gomp> Thumbs Up!




When it should have been like this: (!)

Code:
24 17:30:24 <Gomp>   ___
24 17:30:24 <Gomp>  ( ((
24 17:30:24 <Gomp>   \ =\
24 17:30:24 <Gomp>  __\_ `-\
24 17:30:24 <Gomp> (____))( \------
24 17:30:24 <Gomp> (____)) _
24 17:30:24 <Gomp> (____))
24 17:30:24 <Gomp> (____))____/----'
24 17:30:24 <Gomp>     Thumbs Up!


BTW: Same problem here, unless I wrap it in code tags...

Last edited by gomp; 24/05/07 03:37 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: Spaces gone missing... :( [Re: gomp] #177422 24/05/07 04:37 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
mIRC (typically) removes double spaces. This isn't going to change, and been brought up many times a year. Try using $replace(%Text, $chr(32), $chr(160)), it should show correctly to all mIRC clients (and perhaps other clients).


NaquadaBomb
www.mirc-dll.com
Re: Spaces gone missing... :( [Re: gomp] #177423 24/05/07 04:38 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
this is along term "feature" in mIRC which everyone knows about. If you want to preserve spaces use spaces.dll(search this forum) or hard code to ascii code 160 instead of 32.

btk


billythekid
Re: Spaces gone missing... :( [Re: gomp] #177424 24/05/07 04:47 PM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Welcome to one of the limitations of mIRC.

Normally mIRC only gives you once space between words, unless you have a scripted variable or alias that adds those spaces in for you.

I use $str($chr(160),N) to generate extra spaces in my scripts, where N is the number of spaces needed.
Example:
Code:
msg $chan $str($chr(160),4) hi there

is 

<Gomp>    hi there
(four spaces)


Hope that was of some help to you gomp.


GigIRC Network Admin
irc.gigirc.com
Re: Spaces gone missing... :( [Re: NaquadaServ] #177425 24/05/07 04:53 PM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline
Babel fish
Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Thanks man, I hardcoded it into a script I am using to replace the <> around my nickname with [] and it's working great smile


GigIRC Network Admin
irc.gigirc.com
Re: Spaces gone missing... :( [Re: NaquadaServ] #177426 24/05/07 05:06 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Quote:
Try using $replace(%Text, $chr(32), $chr(160)), it should show correctly to all mIRC clients (and perhaps other clients).
Not really.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Spaces gone missing... :( [Re: qwerty] #177440 24/05/07 07:35 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Originally Posted By: qwerty
Quote:
Try using $replace(%Text, $chr(32), $chr(160)), it should show correctly to all mIRC clients (and perhaps other clients).
Not really.


Nice reply... BTW, your link is broke (server is down)


NaquadaBomb
www.mirc-dll.com
Re: Spaces gone missing... :( [Re: NaquadaServ] #177441 24/05/07 07:59 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
was up when i read it, it basically says that $chr(160) will only show a hard space should the client be configured in that way. it's dependant on font for a start.

[edit]
Quote:
Hard spaces

A different and perhaps more widely used approach is to replace multiple consecutive (normal) spaces with hard spaces - a hard space is basically a character that looks like a space, but isn't interpreted as a space by applications and is therefore also not affected by mIRC's way of manipulating spaces. The hard space character has ASCII code 160, and therefore commonly referred to as "$chr(160)".

The main disadvantage of $chr(160) is that this character is not universally recognized as a hard space: people using different codepages, fonts or operating systems may not see $chr(160) as a space. Additionally, when copying the text, the characters will remain hard spaces even in contexts where this may not be desired, such as dialogs, text files..

Another disadvantage of hard spaces lies in the fact that they are indeed "hard", with as result that mIRC's text display code does not see them as space, and will act differently in regard to, for example, text wrapping.

[/edit]

btk

Last edited by billythekid; 24/05/07 08:00 PM.

billythekid
Re: Spaces gone missing... :( [Re: NaquadaServ] #177443 24/05/07 08:38 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It works here, but recently Saturn's site changed servers, it may be that your ISP's DNS record hasn't been updated yet.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Spaces gone missing... :( [Re: gomp] #177444 24/05/07 08:39 PM
Joined: Jun 2003
Posts: 994
C
CtrlAltDel Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
The simplest way to preserve the spaces, is to put your ascii thumb in a text file and use the alias to play it:

alias thumb play thumb.txt


I refuse to engage in a battle of wits with an unarmed person. wink
Re: Spaces gone missing... :( [Re: billythekid] #177448 24/05/07 09:43 PM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
For normal 'macros' like that, you could paste the 'thumb up' into an empty text file. Say: thumbsup.txt

Then you could use something like:

Code:
alias thumbsup { filter -fk thumbsup.txt _output * }
alias -l _output { msg $active  $+ $regsubex($1,/(?<=\s)(?=\s)/g,) }


Note, this uses ctrl+o inserted between multiple spaces. So if you're using 'colored' macros like that, then it will terminate the color codes.

Re: Spaces gone missing... :( [Re: NaquadaServ] #177453 24/05/07 11:59 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: NaquadaServ
mIRC (typically) removes double spaces. This isn't going to change, and been brought up many times a year. Try using $replace(%Text, $chr(32), $chr(160)), it should show correctly to all mIRC clients (and perhaps other clients).


Using $chr(160) is a "dangerous" way of showing multiple spaces. The reason is that not all fonts display that as a space. Some fonts will display it as a block, which will really screw up how it looks. To avoid causing problems for some people, it's better to use spaces.dll or a ctrl code pairing. As long as you aren't going to have a really long line, this works very well. Personally, I avoid actually pairing them side-by-side except when I need to reduce spaces. For example, if I want 3 spaces, I'd put space,bold,space,bold,space. That allows you to have 3 spaces without using as many bold characters. You just need to make sure that you have an even number of bold characters. Note that you can also use Ctrl-R or Ctrl-U.


Invision Support
#Invision on irc.irchighway.net
Re: Spaces gone missing... :( [Re: gomp] #177494 25/05/07 07:09 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Thing about ASCII pictures in the chat is, not everyone will have the font set which aligns the text just right. Doesn't matter if you solve your double spacing it's still going to be missaligned for those with a font which characters aren't evenly spaced.

mIRC's default fixedsys is good for the ASCII picturing because every character in the font are spaced exactly the same. Many users, including myself, use a different font which character spacing is different depending on each character. For instance, even if, to you, the thumbs up would look straight to people like me it would still be out of wack because the fonts character spacing isn't exactly the same for each character.

If you ask me the ASCII picturing in the chat is just a waste of time anyway ;(.

Quote:
CtrlAltDel - The simplest way to preserve the spaces, is to put your ascii thumb in a text file and use the alias to play it:

alias thumb play thumb.txt


You're right, that's about the only easiest method to use that preserves the spacing. That's always been odd to me that playing does what saying doesn't.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: Spaces gone missing... :( [Re: Scorpwanna] #177623 28/05/07 09:25 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Thank you all!

I'll test this out asap! smile

Thank you ever so much! laugh


I am learning coding now...

I do not understand much, but I am starting to get some of it! smile


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: Spaces gone missing... :( [Re: gomp] #177624 28/05/07 10:06 PM
Joined: Sep 2003
Posts: 261
S
Scorpwanna Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
...Yay?


We don't just write the scripts, we put them to the test! (ScriptBusters)