mIRC Home    About    Download    Register    News    Help

Print Thread
#230116 25/02/11 03:43 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
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.

Code:
          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!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230119 25/02/11 05:40 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Try this:
Code:
  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.
Tomao #230121 25/02/11 05:47 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
not working

* /--------------------------------------------------: not connected to server


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230122 25/02/11 05:48 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
My bad. Try using
Code:
write %f $*

Tomao #230123 25/02/11 06:30 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
not working same problem


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230124 25/02/11 06:32 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
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"
argv0 #230125 25/02/11 06:37 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
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.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230126 25/02/11 06:40 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
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"
argv0 #230127 25/02/11 06:45 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230128 25/02/11 06:51 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
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"
argv0 #230129 25/02/11 06:56 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
* /--------------------------------------------------|copyright: not connected to server (line 1099, CloneScaN.mrc)

same problem again


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230131 25/02/11 07:27 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I did forget to insert an extra $+ and a space.

As Argv0 suggested, using $+( is a better idea:
Code:
  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 $*

Tomao #230132 25/02/11 07:29 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I did forget to insert an extra $+ and a space.

As Argv0 suggested, using $+( is a better idea:
Code:
  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:
Quote:
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.
Tomao #230133 25/02/11 07:32 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
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.

Tomao #230134 25/02/11 07:37 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
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.
Tomao #230227 02/03/11 03:50 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
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:

Code:
--------------------------------------------------
[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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230233 02/03/11 07:07 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Yes, as mentioned, the command gets written to the text file. This should do it:
Code:
  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

Tomao #230234 02/03/11 07:15 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Not working, does not writing anything

Code:
--------------------------------------------------
[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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230235 02/03/11 07:22 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
westor, I apologize for being silly. I mistook /savebuf for /loadbuf. The should write everything to test.log

Code:
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 $*

Tomao #230239 02/03/11 07:40 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Not working man, does not writing the board details into the .log file.

Code:
--------------------------------------------------
[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.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-

Link Copied to Clipboard