Could there be an identifier to return the line return to /write?
Kind of like how $readn is to $read, but $writen to the line of file.txt in /write.
Why?
From the mIRC help file..
/write -dstest c:\info.txt
This will scan file info.txt for a line beginning with the word "test" and if found, deletes it.
So if I have:
Nick:Ctime:Channel:text in seen.txt.
And I want to replace the new text to old text on a on text event, I would want to..
/write -ds $+ $nick seen.txt $nick etc.
But the file will never find $nick, it will find $nick:$ctime:$chan, etc., so that I have too...
/write -ds $+ $gettok(
<the /write line>,1,58) seen.txt $nick etc..
Also..
In seen.txt, if I have.
Nick1:ctime:channel:text.
Nick2:ctime:channel:text.
And for an on text event, I have:
/write -s $+ $nick file.txt $nick etc.
Where $nick is Nick1.
That will override nick1's old text with new next.
But if I delete the sheet...
Then I can't use /write -s because it won't find it.
I would have to /write seen.txt $nick etc.
So I would have to check that $nick is in the 1st word of any line in seen.txt in order to /write -s it, but if $nick isn't even the file, then it won't /write to it via the -s switch.
So I'd like an identifier to whether or not /write has successfully been written.
I tried.
on *:text:*:#channel: {
write -w seen.txt $nick $+ : $+ [ $ctime ] $+ : $+ [ $target ] $+ : $+ [ $network ] $+ :saying " $+ [ $1- ] $+ "
else { write -ws $+ $nick $+ : seen.txt $nick $+ : $+ [ $ctime ] $+ : $+ [ $target ] $+ : $+ [ $network ] $+ :saying " $+ [ $1- ] $+ " }
}
But of course, that won't work because else needs a previous if.
So maybe a:
/write -s seen.txt
if (!$writed) /write seen.txt
Any suggestions?
-Neal.