• 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: What's wrong with the Finder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's wrong with the Finder?


  • Subject: Re: What's wrong with the Finder?
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 16 Apr 2013 04:51:21 -0500

Hello Marion,

On Apr 16, 2013, at 01:24, Marion Dickten <email@hidden> wrote:
Why should I avoid telling the Finder? Yvan Koenig wrote "I always do my best to never trigger the Finder in scripts"

Well.  That's Yvan's particular prejudice.  Which is not to say it is without merit.  You need to know what you're doing with the Finder to avoid its pitfalls.

For instance you never want to use entire contents of a folder if there are many items in it.  Your system will CRAWL - perhaps for minutes at a time - or even MANY minutes.

In contrast to Yvan I personally dislike System Events, because it intermittently takes 3 or more seconds to launch on my machine.  It's a little 800K app, and it can take 3+ seconds to launch????  This used to not be much of an issue, because it would stay resident once launched the first time.  But now with auto-quitting it is completely unpredictable.

(To tell an app called "System Events" to give me the files contained in a folder seems to me anything but straightforward, files not having to do anything with any event.)

Well, I'm guessing it's been a while since you've done much scripting, because System Events came along YEARS ago to try to overcome some of the deficiencies of the Finder and to add more functionality to Applescript.

I just virtually locked up my system for 41 seconds by doing this:

-------------------------------------------------------------------------------------------

set FL to alias ((path to downloads folder as text) & "•• { Downloaders } ••:")

tell application "Finder"
entire contents of FL
end tell

--> 3662 items were found as a list of Finder references.

-------------------------------------------------------------------------------------------

By contrast a small change dropped the runtime to 3.5 seconds:

-------------------------------------------------------------------------------------------

set FL to alias ((path to downloads folder as text) & "•• { Downloaders } ••:")

tell application "Finder"
set _list to entire contents of FL as alias list
end tell

--> 3662 items were found as an alias list.

-------------------------------------------------------------------------------------------

So while the Finder can be a real problem I usually find ways to work with or around it.

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

References: 
 >What's wrong with the Finder? (From: Marion Dickten <email@hidden>)

  • Prev by Date: Re: do shell script, curl and cookies
  • Next by Date: Re: What's wrong with the Finder?
  • Previous by thread: Re: What's wrong with the Finder?
  • Next by thread: Re: What's wrong with the Finder?
  • Index(es):
    • Date
    • Thread