mIRC Home    About    Download    Register    News    Help

Print Thread
#13136 25/02/03 11:16 PM
Joined: Jan 2003
Posts: 94
S
Sabby Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
Would anyone be kind enough to tell me the /filter command to loop through a window and replace áôäë¬ç­íšÅ with $chr(32) when im outputting the window to a file.txt?

I know you can do it using a while($line(@,%i)) but i was told you can do it with /filter also.

Thanks in advance.


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#13137 25/02/03 11:57 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
As far as I know it's impossible to do with filter, as it's designed to output text, not to modify it.

A $fline() loop with /rline replacement is a fairly reasonable solution.
Code:

while $fline(@win,*áôäë¬ç­íšÅ*) {
  rline @win $ifmatch $replace($line(@win,$ifmatch),áôäë¬ç­íšÅ,$chr(32))
}

#13138 26/02/03 12:05 AM
Joined: Jan 2003
Posts: 94
S
Sabby Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
i need it to change while going to the file so i would have to loop through the window while saving the file like..
Code:
var %i 1
while $line(@CCodeF,%i) {
  write file.txt $replace($ifmatch,áôäë¬ç­íšÅ,$chr(32))
  inc %i
}


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#13139 26/02/03 12:28 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
I think you could use my loop for fixing the @window text, then a single /savebuf to save it to the file.


Link Copied to Clipboard