bittihiisi

AppleScript only reaches the topmost window

Discussion created by bittihiisi on Oct 1, 2012
Latest reply on Oct 1, 2012 by bittihiisi

I am working with a FileMaker solution with several files and windows open. I try to make AppleScript call a certain FileMaker script, but I can only reach the topmost window.

 

There are two documents in separate windows: Test1.fmp12 and Test2.fmp12. Test1 is on top and I try to reach Test2 like this:

 

tell application "FileMaker Pro Advanced"

tell document "Test2.fmp12"

activate

do script "Testscript"

end tell

end tell

 

The script above executes Testscript in topmost window Test1, not in Test2!

 

The same occurs also if I try to:

 

tell window "Test2"

tell database "Test2.fmp12"

 

I am using FileMaker Pro Advanced 12.0v2.

Outcomes