Re: Getting record items of a sublist
Re: Getting record items of a sublist
- Subject: Re: Getting record items of a sublist
- From: Axel Luttgens <email@hidden>
- Date: Sun, 30 Oct 2011 12:19:18 +0100
Le 30 oct. 2011 à 11:39, Ronald Hofmann a écrit :
> Phantastic, this is what I was looking for.
> I created a list with 2000 lines.
>
> When looping it takes 4 seconds.
>
> Axels solution takes just 1 second.
>
> That was what I exspected. I love AppleScript.
>
> Example can be downloaded here:
> http://www.jumbosoft.de/public/ASAxelSpeedTest.zip
Hello Ronald,
To be fair, if speed is the main (only?) criterion, you could also make use of that old and somewhat mysterious trick wrt the handling of large lists: make use of references to such lists instead of accessing them directly.
A quick way to do this in your code may be achieved by just replacing:
repeat with n in theNameList
set theItem to myname of n
copy theItem to the end of theChooseList
end repeat
with:
repeat with n in my theNameList
set theItem to myname of n
copy theItem to the end of my theChooseList
end repeat
Other ways may involve the "a reference to" operator or script objects.
I guess you're going to love AppleScript even more. :-)
Axel
_______________________________________________
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