mIRC Home    About    Download    Register    News    Help

Print Thread
#124005 30/06/05 07:51 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
I am trying to write a text into a file after the spaces like:
write text.txt $+($str($chr(32),6),blah)
but that doesnt add the spaces of start of text??

#124006 30/06/05 08:03 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Try using a hard-space instead $+($str($chr(160),6),blah). Just a thought.

-Andy

#124007 30/06/05 08:27 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
What about using TAB character $chr(9) instead of space.
160 doesn't always show as a space in all fonts, maybe the
majority of fonts, but not all.

#124008 30/06/05 09:15 PM
Joined: Sep 2003
Posts: 156
B
bleach Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Sep 2003
Posts: 156
yea 160 is ok thx smile

#124009 30/06/05 09:22 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Below assume the last line of the current file has aa $crlf on it already!

Code:
bset &binvar 1 32 32 32 32 32 32
bwrite text.txt -1 -1 &binvar
write -n text.txt blah $+ $crlf


The write -n says it stops a $crlf being added to the end, but it also stops one from being appended to the front if the file doesnt end in one, which it doesnt after the bwrite
so i use this to attach the rest of the line, then i hardcoded a $crlf onto the end of it.

I could have added the blah $+ $crlf to the binvar but i didnt see any overwhelming advantage to that, maybe one less write? it didnt seem that important.


Link Copied to Clipboard