• 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: Christopher Stone <email@hidden>
  • Date: Fri, 12 Aug 2016 23:00:36 -0500

On Aug 12, 2016, at 01:33, Jim Underwood <email@hidden> wrote:
Instead of using GUI to do a "open with", why not just use the Finder command "open using"?


Hey Jim,

Because I was responding to Mitchell, and I was fairly certain he wanted to change the file-association – and I was demonstrating how the menu activation sequence with System Events worked in El Capitan.

If I was just scripting the opening a file I would never use the Open-With menu in the Finder.  It's clumsy and can take 1 or more seconds to populate (Windows does this better).

Ordinarily there's no benefit in having the Finder open using, because you can simply have the desired app open a file (or files) directly.

-------------------------------------------------------------------------------------------
tell application "Finder" to set finderSelectionList to selection as alias list
if length of finderSelectionList = 0 then error "No files were selected in the Finder!"

tell application "BBEdit"
   activate
   open finderSelectionList
end tell
-------------------------------------------------------------------------------------------

--
Take Care,
Chris

 _______________________________________________
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: Shane Stanley <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>)
 >Re: GUI script a popup button (From: Jim Underwood <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