• 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: is there any way of speeding this up, please?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is there any way of speeding this up, please?


  • Subject: Re: is there any way of speeding this up, please?
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 26 Feb 2012 15:08:13 -0600

On Feb 26, 2012, at 09:36, email@hidden wrote:
I'd like to speed the following script up (up very simple example of a long script). Line 2 is slow, but line 4 is agonisingly slow, with large selections.

This seems faster
______________________________________________________________________

Hey Brian,

Testing here on a MacBook Pro i7 with 4GB of memory and Lion using a folder with 1596 items in it.

with timeout of 180 seconds
tell application "Finder"
set x to selection as alias list
tell window 1
select x
end tell
end tell
end timeout

--> 159.23 sec

with timeout of 180 seconds
tell application "Finder"
set x to selection as alias list
set the selection to x
end tell
end timeout

--> 1.80 sec

So Ed's method is just a trifle faster.  :)

Of course Lion still has this nasty bug that can affect the selection, and the only way I've found to get around it reliably is to create and close a finder window to force the Finder to update the window index.

on lionSelectionBugFix()
tell application "Finder"
set newWin to make new Finder window
close newWin
end tell
end lionSelectionBugFix

--
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: 
 >Re: is there any way of speeding this up, please? (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: is there any way of speeding this up, please?
  • Next by Date: Re: is there any way of speeding this up, please?
  • Previous by thread: Re: is there any way of speeding this up, please?
  • Next by thread: Re: is there any way of speeding this up, please?
  • Index(es):
    • Date
    • Thread