• 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: Thu, 17 Jan 2013 17:04:40 -0600

On Jan 17, 2013, at 11:45, Luther Fuller <email@hidden> wrote:
So, I tried using

tell application "SystemUIServer" to activate

and that worked. Which suggested that I try something even simpler.
I modified my script to this …

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

And now I always get the correct selection! Thanks for the hint.
______________________________________________________________________

Hey Luther,

Yes.  Since you're running an applet it can act in place of the SystemUIServer.

I've tried all manner of methods to get around this gnarly bug.

The only ones to have worked are changing the application context OR opening and closing a new window in the Finder (apparently the latter forces the Finder to update its index of what window is frontmost AND has a selection).

The very strange thing about the latter is that 'target of front window' just works — so it appears that 'selection' has a separate understanding of what window is frontmost.

<shrug>

If you don't want to switch app-contexts then you can open and close a Finder window:

tell application "Finder"
set w to make new Finder window
close w
end tell

I decided this method was too disconcerting (for me), since there's no way to make the window appear off-screen.

--
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

References: 
 >selection bug in Finder (From: Luther Fuller <email@hidden>)
 >Re: selection bug in Finder (From: Christopher Stone <email@hidden>)
 >Re: selection bug in Finder (From: Christopher Stone <email@hidden>)
 >Re: selection bug in Finder (From: Luther Fuller <email@hidden>)
 >Re: selection bug in Finder (From: Luther Fuller <email@hidden>)
 >Re: selection bug in Finder (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Mail preferences in Mt Lion
  • 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