OK I have one that doesn't seem to be answered. I'll past the whole script
The problem is with the TRY. Since it is happening in the Finder and I am trying to pass some info back to FM. THis works fine as a FM script but fails in the runtime. As far as I can tell the only solution would be to change all the Filemaker Pro Advanced references to the runtime app BUT I can't do that because FMPA wants me to show it the app and of course it isn't built yet! So I guess I could build the runtime and then edit IT'S scripts to work. But that seems like a funky workaround. I tried using "me" but I think because it's part of a try still running in the Finder it fails.
-- script to copy files to PT directory 1/21/02
set copysounds to ""
set thetarget to ""
set x to ""
set filename to ""
tell application "FileMaker Pro Advanced"
--activate
set recordCount to count of records
end tell
choose folder with prompt "Pick a destination folder"
set thetarget to result
repeat with x from 1 to recordCount
tell application "FileMaker Pro Advanced"
set copysounds to cell "Find Path" of record x
set effectName to cell "Effect Name:" of record x
set filename to ((thetarget as text) & (cell "Effect Name:" of record x))
set cell "error flag" of record x to ""
set notFoundError to ""
set DupOK to ""
-- find out if file esists
tell application "Finder"
activate
try
alias copysounds
on error
set notFoundError to "true"
display dialog effectName & " file was not found. Check Path." buttons {"OK"} default button 1 with icon stop
tell application "FileMaker Pro Advanced"
set cell "error flag" of record x to "Path Invalid"
end tell
--return
end try