Re: passing error codes from the finder/filemaker back to an applescript
Re: passing error codes from the finder/filemaker back to an applescript
- Subject: Re: passing error codes from the finder/filemaker back to an applescript
- From: "Christopher C. Stone" <email@hidden>
- Date: Fri, 2 Feb 2001 16:29:06 -0600
At 02/02/2001 12:19 -0600, ddahl.com wrought:
>
i have a script that batch processes the creation of Quark docs via data
>
in filemaker. once in a while the TIFF is missing and it kills the whole
>
script until someone comes over and presses return.
>
>
i want to trap for the error (the applescript is embeded in the filemaker
>
file) and just write it to the database record instead of it stopping the
>
workflow. i'm sure there is an easy way to do this, i am just don't know
>
the syntax.
___________________________________________________________________________
Hello David,
In what form is the location of the TIFF? File spec, path, alias?
Without more specifics it's hard to do something direct, but here's a generic try... on error block:
This way avoids the use of the Finder.
set theFile to "Minerva:Tiff Files:the tiff"
try
set theFile to alias theFile
on error
-- Do your error handling here
end try
You can of course involve the Finder and check for the existence of the file, but it tends to be a trifle slower.
set theFile to "Minerva:Tiff Files:the tiff"
tell application "Finder"
if exists of file theFile then
beep
else
beep 2
end if
end tell
Best Regards,
Christopher Stone
______________________________
StoneWorks Computer Consulting
email@hidden