Re: Prevent asking to locate application
Re: Prevent asking to locate application
- Subject: Re: Prevent asking to locate application
- From: Walter Ian Kaye <email@hidden>
- Date: Sun, 28 Mar 2004 20:37:53 -0800
At 08:03p -0800 03/28/2004, Paul Berkowitz didst inscribe upon an
electronic papyrus:
Just do this, using the version you have open on your compuer when you
compile the script, and assuming you really can use the same script for Word
as you can for AppleWorks, i.e. that all you need is to activate it. This
script should work whether or not the application is currently open or not.
(Walter's version only brings a currently open app to the front, it won't
open it.)
Right; cuz he only asked about activating. I didn't go further
without knowing more about his script.
tell application "Finder"
if appChoice is "Microsoft Word" then
set appFile to (application file id "MSWD")
else
set appFile to (application file id "BOBO")
end if
open appFile
end tell
Another way to do the same thing (in X) is:
tell application "System Events"
if appChoice is "Microsoft Word" then
set appFilePath to (application file id "MSWD" as Unicode text)
else
set appFilePath to (application file id "BOBO" as Unicode text))
end if
end tell
tell application appFilePath to activate
Umm, 'application file id' only works in Finder, not System Events.
In 10.2.8, anyway.
-W
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.