mIRC Home    About    Download    Register    News    Help

Print Thread
#47640 06/09/03 10:48 PM
A
andymps
andymps
A
my script reads from the log, but some things have more than on space like some have alot of spaces to make the numbers line up with the correct bit at the top, now how do it stop it from getting rid of the spaces? confused

#47641 06/09/03 10:50 PM
P
pheonix
pheonix
P
try: $replace($read(yourfile),$chr(32),$chr(160))

#47642 06/09/03 10:53 PM
Joined: Feb 2003
Posts: 2,737
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Feb 2003
Posts: 2,737
You've been on these forums long enough to know how, why and where mIRC strips spaces... and have seen 2 dozen threads dedicated to various work-arounds.

To be brief, there are few circomstances where you can display lines with multiple spaces.

/play and /loadbuf can echo lines with many spaces, from a file.
You can sometimes $replace spaces with $chr(160)
&binvars can manipulate strings that have sequences of spaces in them.

- Raccoon

#47643 06/09/03 11:02 PM
A
andymps
andymps
A
well i did this:
Code:
alias run1 {
  /.set %log %logpath $+ renlog_ $+ $date(m-d-yyyy) $+ .txt
  if ($read(%log, 1)) {
    if (*load* !iswm $read(%log ,1)) && (*loading* !iswm $read(%log ,1)) {
      /.notice $me [color:red]$replace($read(%log, 1),$chr(32),$chr(160)))[/color] | /.write FDS_Log_ $+ $date(m-d-yyyy) $+ .txt $read(%log , 1) | /.write -dl1 %log
    }
    else {
      if (*loading* !iswm $read(%log ,1)) {
        .write -dl1 %log
      }
      else {
        if (*loading* iswm $read(%log ,1)) {
          /.notice $me [color:red]$replace($read(%log, 1),$chr(32),$chr(160)))[/color] | /.write FDS_Log_ $+ $date(m-d-yyyy) $+ .txt $read(%log , 1) | /.write -dl1 %log
        }
      }
    }
  }
}

but it doesnt work and i cant see why


Link Copied to Clipboard