mIRC Home    About    Download    Register    News    Help

Print Thread
#162652 21/10/06 05:37 AM
Joined: Oct 2006
Posts: 4
T
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Oct 2006
Posts: 4
I wrote a CRC script. However I want to write an additional function to it that skips the CRC/MD5 check on the current file in the $findfile function using $iif().

The idea is to skip MD5/SFV Checksum files that already exist. Here is the basic idea of the script for CRC Checksum.

$findfile(Path,*,0,N,$iif(.sfv !isin $nopath($1-),.write checksum $crc($1-)))

Probablem is, it just doesn't work. I get blank lines filling up the write file. It doesn't matter if the file being checked is a checksum file or not.

#162653 21/10/06 09:12 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Why are you using $iif()? Try good ol' /if


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#162654 22/10/06 11:17 PM
Joined: Oct 2006
Posts: 4
T
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Oct 2006
Posts: 4
Thanks, it never even occured to me to try and use if statement.

It seems that passing $1- in $filename as a parameter to another alias doesn't work properly.

EDIT: Ok, I forgot to ask about one more thing. When $findfile is called, it returns the number of files found and mIRC treats the return as a command (since I am calling in on a new line in the script.) This causes an unknown command error echo. How can I prevent the return or prevent it from being treated as a command without adding redundant code to the begining of the line?

Last edited by therobin; 22/10/06 11:22 PM.
#162655 23/10/06 03:07 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you are using mIRC 6.2, you can use the /noop command:

/noop $findfile(blah..)

-genius_at_work


Link Copied to Clipboard