mIRC Home    About    Download    Register    News    Help

Print Thread
write particular lines to .txt file #165075 21/11/06 09:44 PM
Joined: Nov 2006
Posts: 4
H
henkie33 Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Hello,

I want to write all the lines containing [test] written by a user called 'bot' in #mybotchan written to a .txt file.
I tried to script it by using this forum but it doesnt seem to work.

Code:
on *:TEXT:*[test]*:#mybotchan:{
if ($nick == bot) {
  /write BOTDB.txt $1-
}
}


Anyone?

Thanks!

Re: write particular lines to .txt file #165076 21/11/06 10:33 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Are there colors, or bold/underline, in [test]? Does test always have []'s around it?

As a note, you never need /'s in a script.


Invision Support
#Invision on irc.irchighway.net
Re: write particular lines to .txt file #165077 21/11/06 10:44 PM
Joined: Nov 2006
Posts: 4
H
henkie33 Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Yes there are color's included, but i tried * so that shouldnt make a difference, yes there are always []'s around it.

Re: write particular lines to .txt file #165078 21/11/06 10:46 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
try
Code:
 
on *:TEXT:*:#mybotchan:{
if ($nick == bot) && ( $+($chr(91),test,$chr(93)) isin $1- ) {
  /write BOTDB.txt $1-
}
} 


billythekid
Re: write particular lines to .txt file #165079 21/11/06 11:15 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Best to use $strip with that...

Code:
on *:TEXT:*:#mybotchan:{
  if ($nick == bot && $+($chr(91),test,$chr(93)) isin $strip($1-)) {
    write BOTDB.txt $1-
  }
} 


Invision Support
#Invision on irc.irchighway.net
Re: write particular lines to .txt file #165080 21/11/06 11:51 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
yeah agreed, was having a brain fart there, was actually, and don't laugh, gonna do *[*t*e*s*t*]*

crazy


billythekid
Re: write particular lines to .txt file #165081 22/11/06 04:10 PM
Joined: Nov 2006
Posts: 4
H
henkie33 Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
hmm it still doesnt work :S, i really tried everything.. Already created .txt file with that name, but it really doesnt write anything to it :S

Im really helpless now..

Re: write particular lines to .txt file #165082 22/11/06 06:02 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try putting it on a new remote file. Maybe another On text event is conflicting with it.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: write particular lines to .txt file #165083 23/11/06 04:35 PM
Joined: Nov 2006
Posts: 4
H
henkie33 Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Thanks that worked!