|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Hello, i have this code, the problem is that before the /savebuf -o command the /write command does not writing anything on the file, any help please.
var %f = test.log
if ($exists(%f)) { .remove -b %f }
write %f $str(-,50)
write %f [ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the clonescan scanning results from the scanning board.
write %f $str(-,50)
write %f $crlf
savebuf -o $dname 1 %f
write %f $crlf
write %f $str(-,50)
write %f Copyright © 2005/2011 by $cls_owner $+ . All rights reserved
- Thanks!
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Try this:
var %f = test.log
if ($exists(%f)) { write -c %f }
var %m = $str(-,50) $+ |[ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the $&
clonescan scanning results from the scanning board.| $+ $str(-,50) $+ | $+ $crlf $+ |filter -fo %f $dname 1| $+ $crlf $+ | $+ $str(-,50) $+ |$&
$+ Copyright © 2005/2011 by $cls_owner $+ . All rights reserved
tokenize 124 %m | write %f $* You don't have to remove the file every single time when you can erase it and start anew.
Last edited by Tomao; 25/02/11 05:53 PM.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
not working
* /--------------------------------------------------: not connected to server
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
The text "--------------------------------------------------" is not part of the script that was pasted in this thread. The error message you showed shows mIRC attempting to execute the above text as a command. Since it's nowhere in this thread, my guess is your problem is in one of your other scripts. Do a search for the above string in all of your files, including any you may perform $read's from.
For future reference, please never write "not working". It is not descriptive, and unhelpful to those actually trying to help you. If people can take 5 minutes out of their life to write you a script, you should be able to take 5 minutes out of yours to write in complete sentences and describe your problem FULLY. Thanks.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
is not in other scripts the line that the error return is in the code that the mate gave me.
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
What mate? Again, please use full sentences and describe your problem fully. I'm not going to ask you to do this again. There is no "----------------...." in the script given to you by Tomao.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
* /--------------------------------------------------: not connected to server (line 1100, CloneScaN.mrc)
1100 LINE: clonescan scanning results from the scanning board.| $+ $str(-,50)| $+ $crlf $+ |filter -fo %f $dname 1| $+ $crlf $+ | $+ $str(-,50) $+ | $+ Copyright © 2005/2011 by $cls_owner $+ . All rights reserved
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
The above command echos fine for me. Did you put spaces between the |'s? If so, remove them. Also, if that doesn't work, use $+($str(-,50),|,...) instead of "| $+ ..."
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
* /--------------------------------------------------|copyright: not connected to server (line 1099, CloneScaN.mrc)
same problem again
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
I did forget to insert an extra $+ and a space. As Argv0 suggested, using $+( is a better idea:
if ($exists(%f)) { write -c %f }
var %m = $+($str(-,50),|,[ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the $&
clonescan scanning results from the scanning board.,|,$str(-,50),|,$crlf,|filter -fo %f $dname 1|,$crlf,|,$str(-,50),|$&
$+ Copyright © 2005/2011 by,$cls_owner,. All rights reserved)
tokenize 124 %m | write %f $*
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
I did forget to insert an extra $+ and a space. As Argv0 suggested, using $+( is a better idea:
if ($exists(%f)) { write -c %f }
var %m = $+($str(-,50),|,[ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the $&
clonescan scanning results from the scanning board.,|,$str(-,50),|,$crlf,|filter -fo %f $dname 1|,$crlf,|,$str(-,50),|$&
$+ Copyright © 2005/2011 by,$cls_owner,. All rights reserved)
tokenize 124 %m | write %f $* [/quote]The out displays correctly for me upon using an echo to print out the info: test.log -------------------------------------------------- test.log [Fri Feb 25 11:28:00 2011]: This file created from the v addon and display the clonescan scanning results from the scanning board. test.log -------------------------------------------------- test.log
test.log filter -fo test.log 1 test.log
test.log -------------------------------------------------- test.log Copyright © 2005/2011 by. All rights reserved
Last edited by Tomao; 25/02/11 07:31 PM.
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
The filter command and the savebuf you've used are the same thing. I like using filter better as a matter of preference.
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
I realized the filter command won't be triggered because it gets written to the log file.
So it either needs to be remove from the %m to work on its own, or use a /play command with the -c switch
/play -cl6 %f
this will locate the line 6 and execute it as a command in the channel.
Last edited by Tomao; 25/02/11 07:42 PM.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Sorry if i late to reply, but this code does not write into a log file the listbox items just only a command check this:
--------------------------------------------------
[Wed Mar 02 17:46:50 2011]: This file created from the CloneScaN v1.0 addon and display the clonescan scanning results from the scanning board.
--------------------------------------------------
filter -fo test.log clonescan 1
--------------------------------------------------
Copyright © 2005/2011 by^WeSt. All rights reserved
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
Yes, as mentioned, the command gets written to the text file. This should do it:
if ($exists(%f)) { write -c %f }
var %m = $+($str(-,50),|,[ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the $&
clonescan scanning results from the scanning board.,|,$str(-,50),|,$crlf,|,$crlf,|,$str(-,50),|$&
$+ Copyright © 2005/2011 by,$cls_owner,. All rights reserved)
tokenize 124 %m | write %f $* | filter -fo %f $dname 1
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Not working, does not writing anything
--------------------------------------------------
[Wed Mar 02 21:14:32 2011]: This file created from the CloneScaN v1.0 addon and display the clonescan scanning results from the scanning board.
--------------------------------------------------
--------------------------------------------------
Copyright © 2005/2011 by^WeSt. All rights reserved
as i see this code paste all the details into the dialog listbox and not writing them into a file
|
|
|
|
Joined: Jul 2007
Posts: 1,129
Hoopy frood
|
Hoopy frood
Joined: Jul 2007
Posts: 1,129 |
westor, I apologize for being silly. I mistook /savebuf for /loadbuf. The should write everything to test.log var %f test.log
if ($exists(%f)) { write -c %f }
var %m = $+($str(-,50),|,[ $+ $fulldate $+ ]: This file created from the $addon v $+ $cls_ver addon and display the $&
clonescan scanning results from the scanning board.,|,$str(-,50),|,$crlf,|,$crlf,|,$str(-,50),|$&
$+ Copyright © 2005/2011 by,$cls_owner,. All rights reserved)
tokenize 124 %m | write %f $*
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Not working man, does not writing the board details into the .log file.
--------------------------------------------------
[Wed Mar 02 21:32:14 2011]: This file created from the CloneScaN v1.0 addon and display the clonescan scanning results from the scanning board.
--------------------------------------------------
--------------------------------------------------
Copyright © 2005/2011 by^WeSt. All rights reserved
Last edited by westor; 02/03/11 07:41 PM.
|
|
|
|
|