Continue If {like magic}

(imported topic written by brolly3391)

If you hate writing those Continue if statements by hand in your action scripts we have several ways to generate them automagically. I will show you my favorite:

Paste this statement into a single clause tab in your relevance debugger.

q: (“continue if {(size of it = " & item 0 of it & " AND sha1 of it = %22” & item 1 of it & “%22) of file %22” & item 2 of it & “%22 of folder %22__Download%22}”) of (size of it as string, sha1 of it , name of it) of file “myFile”

Change the file name and evaluate.

q: (“continue if {(size of it = " & item 0 of it & " AND sha1 of it = %22” & item 1 of it & “%22) of file %22” & item 2 of it & “%22 of folder %22__Download%22}”) of (size of it as string, sha1 of it , name of it) of file "

c:\boot.ini

"

A: continue if {(size of it = 211 AND sha1 of it = “944710dbcd4a072f95a32ea9a23bb749e22d53b4”) of file “boot.ini” of folder “__Download”}

Then you can just paste the finished statement into your action script.

Relevance that writes other relevance is one of my favorite labor saving tricks.

Cheers,

Brolly

(imported comment written by jessewk)

Also, if you are using 6.0+ you can save yourself a lot of headache by using the prefetch command instead of the download command. They do the same thing, but prefetch combines the continue if logic into a single command.

For example, these two commands are identical:

download http://some.site.com/boot.ini
continue if {(size of it = 211 AND sha1 of it = “944710dbcd4a072f95a32ea9a23bb749e22d53b4”) of file “boot.ini” of folder “__Download”}

prefetch boot.ini sha1:944710dbcd4a072f95a32ea9a23bb749e22d53b4 size:211 http://some.site.com/boot.ini