• 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: First run Finder selection problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First run Finder selection problem


  • Subject: Re: First run Finder selection problem
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 27 Sep 2014 00:57:02 -0500

On Sep 26, 2014, at 15:26, James Yost <email@hidden> wrote:
If since Snow Leopard and before Mavericks then you may be hitting the infamous Finder Selection bug.

Appears you are 100% correct. I had never encountered the bug before. Definitive fix is to upgrade my OS, but that's impossible for now. Searching, I noticed a fix (I think it was yours) suggesting opening and closing a new Finder window - And that appears to work with this script.
______________________________________________________________________

Hey James,

The Finder-Selection bug appeared in Lion and was finally squashed in Mavericks.

Opening a new window was the first solution I found, and it works but is a rather disruptive solution.

After a lot of experimentation I finally settled on a less intrusive option - switching out of the Finder and back to set the selection properly.

Since I run nearly all of my scripts from FastScripts my solution is generally this (pre Mavericks):

----------------------------------------
tell application "FastScripts" to activate
tell application "Finder"
activate
set _sel to selection as alias list
end tell
if _sel ≠ {} then
# Continue
end if
----------------------------------------

Using something that's already running is of course the fastest solution, and a good alternative that doesn't depend upon 3rd party software is:

----------------------------------------
tell application "SystemUIServer" to activate
----------------------------------------

This causes the Finder to "blink", but you don't have that intrusive window flying around.

I used System Events for a while, but I found it would quit when unused for a while - and restarting the app could sometimes put very noticeable pauses in my scripts.  I finally settled on the SystemUIServer which is always running, until it occurred to me that I was running from FastScripts anyway and might as well use that.

Occasionally I run AppleScripts from Keyboard Maestro, and when appropriate I've used the Keyboard Maestro engine for my work-around.

Keyboard Maestro 6 has a specific option to work around this very nasty bug when using its own actions that work with the Finder-Selection.

--
Best Regards,
Chris


-------------------------------
Tags: @Finder, @Selection, @Bug
-------------------------------

 _______________________________________________
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: 
 >First run Finder selection problem (From: Lists <email@hidden>)
 >Re: First run Finder selection problem (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: First run Finder selection problem
  • Next by Date: Re: Simple finder window sort worked in mountain lion but not in Mavericks
  • Previous by thread: Re: First run Finder selection problem
  • Next by thread: Re: First run Finder selection problem
  • Index(es):
    • Date
    • Thread