mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Hi!

What character combination do I need to use in mirc scripting so that it shows as a space?

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
$chr(32)


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
$chr(32) ??
Not sure exactly what you mean.

Joined: May 2005
Posts: 25
E
Er1C Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: May 2005
Posts: 25
Well it's about an IMDb script.

We want the colors out. So I changed this original part:

alias -l _rating {
var %s = $ceil($1), %i 1
while (%i <= 10) { if (%i <= %s) { var %z $+(%z,7*) } | else { var %z $+(%z,14*) } | inc %i }
return $+(11[,%z,11])
}

to

alias -l _rating {
var %s = $ceil($1), %i 1
while (%i <= 10) { if (%i <= %s) { var %z $+(%z,*) } | else { var %z $+(%z,*) } | inc %i }
return $+([,%z,])
}

But now, (the output are 1o * signs so..

ration ********** where the rating is like 7 so you saw 7 stars in color and 3 not in color. but now i removed the colors, you can't see the difference anymore.

so i tried to replace the else stars command with dots, with _ signs but it doesn't look nice. so nice i thought, let's fill the non colored stars (in the original code) with spaces

but how laugh

Joined: May 2005
Posts: 4
K
Self-satisified door
Offline
Self-satisified door
K
Joined: May 2005
Posts: 4
If $chr(32) doesnt work for you try $chr(160)
wink


·Kanj¹za¹·
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
$chr(32) is the international ascii code for the space character, the same thing you get by pressing the space bar.
$chr(160) while in most fonts looks like the same character, it is not the same character and may not be interpreted the same.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Mirc cant display consecutive spaces, and using your method wont store them either

You can use this, it places a CTRL-O (change to ordinary text) before each space, thus seperating them but invisibly (unless you have colored the line already)
Code:
alias -l _rating {
  var %stars = $iif($ceil($1) &lt;= 10,$iif($v1 &gt;= 0,$v1,0),10)
  return $+([,$str(*,%stars),$str($+(,$chr(32)),$calc(10 - %stars)),])
}


You can use this, it places two CTRL-B's (bold on/bold off) before each space, thus seperating them but invisibly (bold remains what it was already becuase its toggled twice)
Code:
alias -l _rating {
  var %stars = $iif($ceil($1) &lt;= 10,$iif($v1 &gt;= 0,$v1,0),10)
  return $+([,$str(*,%stars),$str($+(,$chr(32)),$calc(10 - %stars)),])
}


You can use this, it places a hardspace $chr(160) which is asc for space + 128, down insead of a space, these are maintained by mirc, however some fonts dont have a blank character as 160 so it well show up as something.
Code:
alias -l _rating {
  var %stars = $iif($ceil($1) &lt;= 10,$iif($v1 &gt;= 0,$v1,0),10)
  return $+([,$str(*,%stars),$str($chr(160),$calc(10 - %stars)),])
}


Link Copied to Clipboard