Re: is there any way of speeding this up, please?
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
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
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