Re: GUI script a popup button
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"?
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 -------------------------------------------------------------------------------------------
|
_______________________________________________
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