I have one particular problem with file maker pro.
On the mac there are both FMP11 and FMP12 installed.
I have a script which makes FMP open a doc and do some processing.
The script worked so far OK but the new is that I have both FMP11 and FMP12 docs mixed. So I have to open appropriate FMP to do the job.
The trouble is that they are both registered with the same name in the AppleScript Application listing, so if I ātell application File Maker Pro Advancedā, it does not strictly define to which one am I telling.
I tried to trick the problem by quitting all FMPs and then open a FMP11 or FM12 dummy document through Finder, this will start the appropriate FMP version, but then when I want to switch to it with activate, or I use the tell for the first time after that, if the one which is open is FMP11 all works fine, if the FMP12 is open, the tell statement will open the FMP11.
The strangest thing of all is that in another simplified version of the script, it works fine.
So my question is: is there any other way of using the tell application then with the registered Name of the application?
I tried to get the properties for both FMP11 and FMP12 and here is the result:
[i]FMP11
get properties of application process āFileMaker Proā
ā {enabled:missing value, unix id:63125, file:alias āMACHD:Applications:FileMaker Pro 11 Advanced:FileMaker Pro Advanced.app:ā, creator type:āFMP7ā, subrole:missing value, entire contents:{}, selected:missing value, application file:alias āMACHD:Applications:FileMaker Pro 11 Advanced:FileMaker Pro Advanced.app:ā, orientation:missing value, role:āAXApplicationā, accepts high level events:true, file type:āAPPLā, value:missing value, position:missing value, id:25741451, displayed name:āFileMaker Pro Advancedā, name:āFileMaker Proā, class:application process, background only:false, frontmost:false, size:missing value, visible:true, Classic:false, role description:āapplicationā, maximum value:missing value, architecture:āi386ā, partition space used:0, short name:āFileMaker Pro Advancedā, focused:missing value, minimum value:missing value, help:missing value, title:āFileMaker Pro Advancedā, accepts remote events:false, description:āapplicationā, total partition size:0, accessibility description:missing value, has scripting terminology:true, bundle identifier:ācom.filemaker.client.advancedā}
FMP12
get properties of application process āFileMaker Proā
ā {enabled:missing value, unix id:63199, file:alias āMACHD:Applications:FileMaker Pro 12 Advanced:FileMaker Pro Advanced.app:ā, creator type:āFM12ā, subrole:missing value, entire contents:{}, selected:missing value, application file:alias āMACHD:Applications:FileMaker Pro 12 Advanced:FileMaker Pro Advanced.app:ā, orientation:missing value, role:āAXApplicationā, accepts high level events:true, file type:āAPPLā, value:missing value, position:missing value, id:25753742, displayed name:āFileMaker Pro Advancedā, name:āFileMaker Proā, class:application process, background only:false, frontmost:false, size:missing value, visible:true, Classic:false, role description:āapplicationā, maximum value:missing value, architecture:āi386ā, partition space used:0, short name:āFileMaker Pro Advancedā, focused:missing value, minimum value:missing value, help:missing value, title:āFileMaker Pro Advancedā, accepts remote events:false, description:āapplicationā, total partition size:0, accessibility description:missing value, has scripting terminology:true, bundle identifier:ācom.filemaker.client.advanced12ā}[/i]
So it seems that the string appearing in Dictionary of the Apple Script Editor is the displayed name, short name or title propery but they are same for both apps.
So how can I open and tell to the appropriate FMP version, any idea?
Browser: Safari 534.57.2
Operating System: Mac OS X (10.7)