• 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: GUI script a popup button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUI script a popup button


  • Subject: Re: GUI script a popup button
  • From: Jim Underwood <email@hidden>
  • Date: Fri, 12 Aug 2016 06:33:01 +0000
  • Thread-topic: GUI script a popup button

Hey Chris,

Instead of using GUI to do a "open with", why not just use the Finder command "open using"?




use AppleScript version "2.4" -- Yosemite (10.10) or later

use scripting additions


-- Of course, you can add a choose from list to select the app

set appPath to path to application "TextEdit"


tell application "Finder"

set itemList to selection

set oFile to (item 1 of itemList) as alias

open oFile using appPath

end tell




Best Regards,

 

Jim Underwood

aka JMichaelTX


From: <applescript-users-bounces+jmichael=email@hidden> on behalf of Chris Stone <email@hidden>
Date: Thu, Aug 11, 2016 at 8:33 PM
To: "ASUL (AppleScript)" <email@hidden>
Subject: Re: GUI script a popup button

-------------------------------------------------------------------------------------------
# Manipulate the Open-With menu in the Finder with GUI-Scripting.
-------------------------------------------------------------------------------------------
 _______________________________________________
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

  • Follow-Ups:
    • Re: GUI script a popup button
      • From: Christopher Stone <email@hidden>
References: 
 >GUI script a popup button (From: Mitchell L Model <email@hidden>)
 >Re: GUI script a popup button (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: GUI script a popup button
  • Next by Date: Re: GUI script a popup button
  • Previous by thread: Re: GUI script a popup button
  • Next by thread: Re: GUI script a popup button
  • Index(es):
    • Date
    • Thread