mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I trying to write to a file, then i want to add more then one space, like this.

line 1 long :
line 1 lon :
line 1 long :

i want the : to be on 1 line, but since it removes my space "including $chr(32)" when i write to the file it looks like:

line 1 long :
line 1 lon :
line 1 long :

any way i can solve this?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Both those examples look identical to me


like this?????


Code:
lon      :


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
line 1 long :
line 1 lon : <- it missing one space there.
line 1 long :

or like this example
Code:
line 1 long version :
line 1 :
line 1 long :

and i want it to show
Code:
line 1 long version :
line 1              :
line 1 long         :

hope you understand now? i writing to a file like i wrote befor, and i want it to be lined up all the : at a straight line. but when i write to the file it wont keep the space like i want it to. and tested to ad $chr(32) $chr(32) $chr(32) $chr(32), but still only one space in the file, the rest are removed.

i noticed this site also removed the space i added, so had to put it in a code tag.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You would have to use binary variables to write the sequence of spaces to the file. You could do this by either putting the entire contents of the file into a binary variable and /bwrite the whole thing at once, or you could use the file handling functions and then use "/fwrite -b filehandle &binvar" just to write the sequences of spaces and use plaintext /fwrite's for the rest of the content.

The reason the spaces didn't show up in your first post is that HTML removes them unless they're in <pre> tags.


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

Link Copied to Clipboard