• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prevent asking to locate application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Prevent asking to locate application
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Prevent asking to locate application (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: AppleScript & HTML Again...
  • Next by Date: Re: applescript-users digest, Vol 3 #2563 - 9 msgs
  • Previous by thread: Re: Prevent asking to locate application
  • Next by thread: Re: Prevent asking to locate application
  • Index(es):
    • Date
    • Thread