Two ways I can think of (or could find). First, a FileMaker method of its own: Get (FileMakerPath). This is in some ways easist, though it would mean you'd have to figure out how/when to pass it over to your AppleScript. I would generally put some result into a global field, then go a dedicated layout (named "AS"), to avoid "kind see the field" problems from AppleScript.
A different method, run in AppleScript itself can be run into AppleScript itself, with an addition of a Unix command to see what FileMaker Pro is running (assuming it is "Advance" or regular).
setapp_foundtodo shell script "ps -axww | grep [F]ileMaker' 'Pro | grep 'Advanced'"
-- see if it's "Advanced"
setapp_foundtodo shell script "ps -axww | grep [F]ileMaker' 'Pro"
In most cases, you do not need the Tell and End tell statements for FMPA or FMP since the script is executed in those applications.
Yes, what Jade said is the first thing to look hard at. I also agree with you Carolyne, that it is annoying the FileMaker Pro vs. FileMaker Pro Advanced are seen differently by AppleScript. Who's fault it is is another story (beyond me).