Trying to do a little experimenting with AppleScript, but I ran into trouble when "tell application FileMaker Pro Advanced" was opening version 16 instead. So I changed to the following...
set p to "/Applications/FileMaker Pro 17 Advanced/FileMaker Pro Advanced.app"
tell application p
go to database "MyDatabase"
do script FileMaker Script "My Script"
But now it doesn't seem to recognize the FileMaker specific keywords. I get the error "Expected end of line, etc. but found “"”. This is in reference to the quotation mark at "MyDatabase", suggesting that it has not understood "go to database".