Re: wrong result when trying to get Selection from finder window
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