mIRC Homepage
Posted By: gomp Spaces gone missing... :( - 24/05/07 03:33 PM
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...
Posted By: NaquadaServ Re: Spaces gone missing... :( - 24/05/07 04:37 PM
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).
Posted By: billythekid Re: Spaces gone missing... :( - 24/05/07 04:38 PM
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
Posted By: Trixar_za Re: Spaces gone missing... :( - 24/05/07 04:47 PM
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.
Posted By: Trixar_za Re: Spaces gone missing... :( - 24/05/07 04:53 PM
Thanks man, I hardcoded it into a script I am using to replace the <> around my nickname with [] and it's working great smile
Posted By: qwerty Re: Spaces gone missing... :( - 24/05/07 05:06 PM
Quote:
Try using $replace(%Text, $chr(32), $chr(160)), it should show correctly to all mIRC clients (and perhaps other clients).
Not really.
Posted By: NaquadaServ Re: Spaces gone missing... :( - 24/05/07 07:35 PM
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)
Posted By: billythekid Re: Spaces gone missing... :( - 24/05/07 07:59 PM
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
Posted By: qwerty Re: Spaces gone missing... :( - 24/05/07 08:38 PM
It works here, but recently Saturn's site changed servers, it may be that your ISP's DNS record hasn't been updated yet.
Posted By: CtrlAltDel Re: Spaces gone missing... :( - 24/05/07 08:39 PM
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
Posted By: Rand Re: Spaces gone missing... :( - 24/05/07 09:43 PM
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.
Posted By: Riamus2 Re: Spaces gone missing... :( - 24/05/07 11:59 PM
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.
Posted By: Scorpwanna Re: Spaces gone missing... :( - 25/05/07 07:09 PM
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.
Posted By: gomp Re: Spaces gone missing... :( - 28/05/07 09:25 PM
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
Posted By: Scorpwanna Re: Spaces gone missing... :( - 28/05/07 10:06 PM
...Yay?
© mIRC Discussion Forums