Double Tell Problem
Double Tell Problem
- Subject: Double Tell Problem
- From: Xandra Lee <email@hidden>
- Date: Sat, 7 Apr 2001 16:31:37 -0400
I have both FMP4 and 5 on disk. I've renamed FMP5 to "Filemaker Pro 5",
(to avoid problems with Quickeys and other apps)
I'm trying to rewrite routines, so that the proper app will open based
on file type of a particular DB.(if type "FMP5" then get application file
id "FMP5")
As you can see from the log following the scriptlet, The Application
NAME is taking precedence over the appID reference. Is there a workaround
for this scenario?
----------------------------------------------
tell application "Finder"
set appPath to application file id "FMP5" as string
set appName to name of application file id "FMP5"
end tell
launch application appPath
tell application "FileMaker Pro"
tell application appName
-- [Do Stuff]
activate
--just some bogus commands for testing
if (count of windows) is less than 1 then
do menu menu item "Open
" of menu "File" --(that's an elipsis)
end if
end tell
end tell
----------------------------------------------
(* THE LOG
tell application "Finder"
get application file id "FMP5"
--> "Bud:Applications-Bud:FileMaker Pro 5 Folder:FileMaker Pro 5"
get name of application file id "FMP5"
--> "FileMaker Pro 5"
end tell
tell application "FileMaker Pro 5"
launch
end tell
tell application "FileMaker Pro"
activate
count every window of application "FileMaker Pro 5"
--> FileMaker Pro got an error: Object not found.
*)
Note the error is being generated because Filemaker 4 (NOT 5) is
frontmost.
So FMP4 is being asked how many windows are open in 5
Thanks in advance,
xandra
Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><
http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><
http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>