Can an Error be used as a conditional clause?

hi, i’m very new yet to applescript so i get stucked with this kind of things…

i have a bunch of images to process, thousands, but some (don’t know how many, nor where) are of types that Image Event cannot read nor write (like EPS, PCD, CDW…).
so, what i wanted to do is this:

if an error occurs, then move the file causing de error to errorFolder, else, move it to doneFolder

but i can’t get around it.:confused:

thanks for your help.

Martin.

Model: G4
Browser: Firefox 1.5.0.5
Operating System: Mac OS X (10.4)

That’s what a try block is for. They go like this:

try
-- attempt to do something that could fail
on error -- i.e it didn't work
-- do the other thing, recover, notify, whatever
end try

i’m terribly sorry. i don’t know why i was stuck in this kind of conditional:


try
--process an image
on error
--move it to errorFolder
else
--move it to doneFolder
end try

i didn’t realize that on TRY, when error occurs, it skips the remaining steps of TRY and goes directly to “on error”:


try
--process an image
--move it to doneFolder
on error
--move it to errorFolder
end try

again, sorry.
and thanks for all your help.

martin.

No need to be sorry; everyone has to learn how to to this and lots of it isn’t obvious. Part of the learning curve.