AnsweredAssumed Answered

How to get the document of the background window with AppleScript ?

Question asked by Vincent_L on Jan 16, 2015
Latest reply on Jan 16, 2015 by steve_ssh



I need to get the "document" (= the filename), of the background window just below the current one, in AppleScript.


I can get the background window name, but I want the name of the file (because it can differ rom the window name).


tell application "FileMaker Pro Advanced"

  name of window 2

end tell


I can also get the base table of that window, but I still can't get the document

tell application "FileMaker Pro Advanced"

  set basetable to name of current table of window 2

end tell


However I can get the specifier of the base table, and that reference contains the document, but I can't access it


tell application "FileMaker Pro Advanced"

  set a to current table of window 2 as specifier

end tell

returns : table "Attributes" of document "Contacts.fmp12" of application "FileMaker Pro Advanced"


"document of window 2" doesn't work


Filemaker's AppleScript dictionary says that window is contained by document. So is there a way to get the container of an AppleScript object


"container of window 2" doesn't work.


I've been pulling my hairs for 2 days, I'm going nuts.


Thanks for your help


P.S : If I can get the behind's window database file, using Filemaker scripting, I'm ok with that. But I tried, and I think that's no possible reliably (regardless window names)