• 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: Slow Command in Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slow Command in Snow Leopard


  • Subject: Re: Slow Command in Snow Leopard
  • From: "email@hidden" <email@hidden>
  • Date: Sun, 7 Mar 2010 15:57:26 -0800

>
> >Shane>FWIW, my (admittedly limited) testing suggests Finder scripting is even
> slower in 10.6 than before.

I get results faster using System Events with this script. (Although probably not as fast as shell)

System events returns file specifications (file "volume:folder:file") rather than alias list, but it's easy enough to convert those to aliases.

HTH,

ES
-------------
set prefsRef to path to preferences folder

set startStrings to {"Adobe Save For Web 9.0 Prefs", "Adobe", "A", "xxx"}
set AppleScript's text item delimiters to {tab}
set PrefResults to {{"String", "ItemsFound", "Time"} as text}

repeat with prefIdent in startStrings
	set startTime to current date
	tell application "System Events"

		set itemsList to (every file of prefsRef whose name starts with prefIdent)

	end tell
	set elapsedTime to (current date) - startTime
	set theseResults to {prefIdent as text, the (count of itemsList) as text, elapsedTime as text} as text
	set the end of PrefResults to theseResults
end repeat

set AppleScript's text item delimiters to {return}

display dialog PrefResults as text
PrefResults as text
-- String	ItemsFound	Time
-- Adobe Save For Web 9.0 Prefs	1	1
-- Adobe	4	0
-- A	8	1
-- xxx	0	0 _______________________________________________
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: 
 >Re: Slow Command in Snow Leopard (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Slow Command in Snow Leopard
  • Next by Date: Re: Big bug in Excel Applescript?
  • Previous by thread: Re: Slow Command in Snow Leopard
  • Next by thread: Re: Slow Command in Snow Leopard
  • Index(es):
    • Date
    • Thread