• 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: selection bug in Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selection bug in Finder


  • Subject: Re: selection bug in Finder
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 16 Jan 2013 19:11:16 -0600

On Jan 16, 2013, at 14:57, Luther Fuller <email@hidden> wrote:
I have a handler that starts ...

on getSelection()
tell application "Finder"
activate
set selList to get selection

It has worked flawlessly in Leopard, Snow Leopard and Lion.
______________________________________________________________________

Hey Luther,

This is a long-standing bug that first showed up in Lion and as never been fixed:

http://lists.apple.com/archives/applescript-users/2011/Aug/msg00360.html

The work-around is to open a new Finder-window and close it before getting the selection OR activating another app and reactivating the Finder.

I do this with FastScripts, because I run most of my scripts with it - but the SystemUIServer works quite well.

tell application "SystemUIServer"
activate
end tell

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

The UI blinks, but it's the most unobtrusive work-around I've found.

--
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: selection bug in Finder
      • From: Shane Stanley <email@hidden>
    • Re: selection bug in Finder
      • From: Christopher Stone <email@hidden>
References: 
 >selection bug in Finder (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: selection bug in Finder
  • Next by Date: Re: selection bug in Finder
  • Previous by thread: Re: selection bug in Finder
  • Next by thread: Re: selection bug in Finder
  • Index(es):
    • Date
    • Thread