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: Xandra Lee <email@hidden>
- Date: Tue, 20 Feb 2001 07:09:45 -0500
>
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.
>
___________________________________________________________________________
Hi David,
I liked Chris Stone's idea of trying to get FMP to resolve the alias to
generate the error, but I sensed you wanted to retain specifics on which
files were missing within the FMP Database.
Assuming that's the case, here's what I'd do:
1. create a global text field in the DB "gScriptErrors" then:
>
Orig snippet by Christopher Stone
>
This way avoids the use of the Finder.
>
>
set theFile to "Minerva:Tiff Files:the tiff"
>
>
try
set theAlias to alias theFile
>
on error
>
-- Do your error handling here
set oldErrors to cell "gScriptErrors" of current record of database 1
set fullErrors to (oldErrors & theFile & return)
set cell "gScriptErrors" of current record of database 1 to fullErrors
>
end try
Of course
1. you'd probably also want to include the date
((current date) as string) at beginning of Script to your global field
Also..If you're anticipating more than a couple errors, it would be
smartest, to generate a list of missing files, parse with paragraph
returns, THEN at the end of the script set the field just once.
Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><
http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><
http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>