Testing for Presence of AppleScript from Filemaker

This is somewhat more of a FileMaker question than an ApplScript question, but it seemed like an appropriate one to ask in this forum.
From within an FMP solution, I am trying to trap for the presence of AppleScript.
I tried writing an FMP script which performs the following AppleScript:

tell application "Finder" to get computer "ascv"
set as_gestalt to result
tell application "FileMaker Pro" set cell "gAppleScript Version" of database "test" to as_gestalt
end tell

This works perfectly when AppleScript is installed.
I was hoping that in cases which AppleScript was not installed, FMP would skip the Perform AppleScript step, and then by testing for IsEmpty(gAppleScript Version), I could deal with the absence of AppleScript accordingly.
However, the behavior instead is for the FMP application to unexpectedly quit when the above script is run on a Mac without AppleScript.
Can anyone suggest an adjustment to this approach, or a clean & simple way to trap for the presence of AppleScript from within FMP? Essentially, I don’t even care if the method traps for the AppleScript version; above all, I really just need to know if AppleScript is installed or not.
Thanks, Rusty.

: This is somewhat more of a FileMaker question than an
: ApplScript question, but it seemed like an appropriate
: one to ask in this forum.
: From within an FMP solution, I am trying to trap for the
: presence of AppleScript.
: I tried writing an FMP script which performs the
: following AppleScript: tell application
: “Finder” to get computer “ascv”
: set as_gestalt to result
: tell application “FileMaker Pro” set cell
: “gAppleScript Version” of database
: “test” to as_gestalt
: end tell
: This works perfectly when AppleScript is installed.
: I was hoping that in cases which AppleScript was not
: installed, FMP would skip the Perform AppleScript
: step, and then by testing for IsEmpty(gAppleScript
: Version), I could deal with the absence of AppleScript
: accordingly.
: However, the behavior instead is for the FMP application
: to unexpectedly quit when the above script is run on a
: Mac without AppleScript.
: Can anyone suggest an adjustment to this approach, or a
: clean & simple way to trap for the presence of
: AppleScript from within FMP? Essentially, I don’t even
: care if the method traps for the AppleScript version;
: above all, I really just need to know if AppleScript
: is installed or not.
: Thanks, Rusty.
The only thing that I can think would be helpful is to send an AppleEvent in FileMaker to the finder. AppleScript doesn’t need to be present for AppleEvents to work. They are built into the system and exist with or without the user interface of AppleScript. I’m not really familiar with the AppleEvents but I do know that it is an option in FileMaker’s ScriptMaker.

how about
Set Error Capture [On]
Set Field [“gTestForApplescript”, ““””]
Perform AppleScript [“set cell “testForApplescript” to 1”]
If [“testForApplescript != 1”]
Beep
Show Message [“This solution requires Applescript”]