Script won't "activate" within FileMaker Pro

Hi to all,

I’m sure it used to run in the past, but now it doesn’t work any longer…

I have a script, embedded in FileMaker Pro 8.0 Anvanced, that starts, depending on certain IFs and ELSEs, different FileMaker scripts.
The problem is that one script is in database DB1.FP7, the other in DB2.FP7. When database DB1.FP7 is in the foreground the script in DB2.FP7 is not to be found, if DB2.FP7 DB1’s script could not be found.

After finding that out I integrated “activate” before every “do script…”, that didn’t work neither.
Then I said to myself “Well give 'em some time” and I integrated a “delay 2” after “activate”. No use… it doesn’t work!

Any ideas how to activate the right database?

Thanks in advance,

Andreas

It could be that the script object belongs to the database. Did you tell the database?

tell application “FileMaker Pro Advanced”
tell database “Database name”
do script FileMaker script “Closing”
end tell
end tell