mIRC Home    About    Download    Register    News    Help

Print Thread
need space between filesize !! #80131 21/04/04 06:16 PM
Joined: Apr 2004
Posts: 4
S
Smity Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2004
Posts: 4
hello all

I`m trying to create something but i want to use a space between the size and the outcome (222 MB)

I used this command:
$bytes($file($fs.read(fireserv,%xtemp)).size,bgmgt3).suf
but the result is 222MB (no space)
I dont get it to work.. can somebody help me please to fix this.
thx.

Re: need space between filesize !! #80132 21/04/04 06:26 PM
Joined: Apr 2004
Posts: 4
B
BlueKai Offline
Self-satisified door
Offline
Self-satisified door
B
Joined: Apr 2004
Posts: 4
Isn't a force space something like this:

$+ $chr(160)

Re: need space between filesize !! #80133 21/04/04 06:33 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
$chr(32) is the character for a space.

Regards,


Mentality/Chris
Re: need space between filesize !! #80134 21/04/04 07:12 PM
Joined: Apr 2004
Posts: 4
S
Smity Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2004
Posts: 4
i know chr(160) is for space.. but how to use it in the command line.
$bytes($file($fs.read(fireserv,%xtemp)).size,bgmgt3).suf
because i get a 3 digit number with a suf of the filesize like MB
i dont know where to put the space.

Re: need space between filesize !! #80135 21/04/04 07:19 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Put this in your remotes (Alt+R):
Code:
alias bytes2 {
  var %r
  !.echo -q $regsub(bytes2,$bytes($iif($1,$1,0) [ $iif($2 != $null,$chr(44) $2,$chr(32)) ] ).suf,/([a-z])/i,$+($chr(32),\1),%r)
  return %r
}


Then just use $bytes2($file($fs.read(fireserv,%xtemp)).size, 3)


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: need space between filesize !! #80136 21/04/04 07:34 PM
Joined: Apr 2004
Posts: 4
S
Smity Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2004
Posts: 4
sorry,

Invalid format: $regsub


Re: need space between filesize !! #80137 21/04/04 07:37 PM
Joined: Apr 2004
Posts: 4
S
Smity Offline OP
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Apr 2004
Posts: 4
oeps ... it worked... thx m8`
and i worked on for 4 days frown
this is cool.
thx all for reply