• 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: wrong result when trying to get Selection from finder window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong result when trying to get Selection from finder window


  • Subject: Re: wrong result when trying to get Selection from finder window
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 02 Nov 2012 04:54:48 -0500

On Nov 02, 2012, at 04:27, Ronald Hofmann <email@hidden> wrote:
I have the following in Mountain Lion and this only happens when opening a folder from the desktop or another space.
______________________________________________________________________

Hey Ronald,

This is the nasty Finder-selection-bug introduced in Lion and not fixed in Mountain Lion.

There are two reliable ways to get around it, and both are fugly:

tell application "Finder"
set newWin to make new Finder window
close newWin
set sel to selection as alias list
end tell

OR

tell application "SystemUIServer" to activate
tell application "Finder"
activate
set sel to selection as alias list
end tell

I use FastScripts instead of the SystemUIServer, since it runs 24/7 on my machine and runs most of my Applescripts.  Some people prefer to use System Events, but I've found that occasionally when not already running it can introduce a significant delay on launching.

You can find a fair bit of discussion on-list using Google:

--
Best Regards,
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: wrong result when trying to get Selection from finder window
      • From: Michelle Steiner <email@hidden>
    • Re: wrong result when trying to get Selection from finder window
      • From: Robert Poland <email@hidden>
References: 
 >wrong result when trying to get Selection from finder window (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: wrong result when trying to get Selection from finder window
  • Next by Date: Re: wrong result when trying to get Selection from finder window
  • Previous by thread: wrong result when trying to get Selection from finder window
  • Next by thread: Re: wrong result when trying to get Selection from finder window
  • Index(es):
    • Date
    • Thread