• 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: How to set application which opens a file via Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set application which opens a file via Applescript?


  • Subject: Re: How to set application which opens a file via Applescript?
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 30 Aug 2015 16:39:27 +0200

If you don't want to link your script to a precise version of the opener application, you may use :

set aFile to (path to desktop as text) & "erreur Numbers.rtf" as alias

tell application "Finder"
open information window of aFile
end tell
set theOpener to "TextWrangler.app"
tell application "System Events" to tell process "Finder"
tell first window to tell first scroll area
set popUp to first pop up button
click popUp
set theMenuItems to name of menu items of menu 1 of popUp
repeat with anItem in theMenuItems
if anItem starts with theOpener then
click menu item anItem of menu 1 of popUp
exit repeat
end if
end repeat
end tell
end tell


Yvan KOENIG running Yosemite 10.10.5 in French (VALLAURIS, France) dimanche 30 août 2015 16:38:58



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >How to set application which opens a file via Applescript? (From: "S. J. Cunningham" <email@hidden>)
 >Re: How to set application which opens a file via Applescript? (From: "S. J. Cunningham" <email@hidden>)
 >Re: How to set application which opens a file via Applescript? (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: How to set application which opens a file via Applescript?
  • Next by Date: Re: How to set application which opens a file via Applescript?
  • Previous by thread: Re: How to set application which opens a file via Applescript?
  • Next by thread: Re: How to set application which opens a file via Applescript?
  • Index(es):
    • Date
    • Thread