Re: Determining item number matching "x" in a list
Re: Determining item number matching "x" in a list
- Subject: Re: Determining item number matching "x" in a list
- From: Simon Brown <email@hidden>
- Date: Wed, 26 Mar 2003 20:25:44 +0000
on 14/3/03 16:01, Emmanuel at email@hidden wrote:
>
>
This script writes 32000 random ASCII characters to a variable. It
>
then loops through every character and reports the index of every "a"
>
it finds.
>
>
The second loop takes about a 1/50 second on my machine (G3 Pismo 400
>
Mhz), or 14 seconds if I loop through a million items.
>
>
set s to ""
>
repeat 32000 times
>
set s to s & (ASCII character of (random number from 10 to 253))
>
end repeat
>
find text "a" in s with all occurrences
>
>
Emmanuel
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
>
I've just been catching up with the as-users list.
I tried to use the code snippet above but "with all occurrences" is not
recognised as valid syntax OMM. Is it OSX only? Or what minimum version of
satimage OSAX?
Otherwise the code works fine, though much slower on my machine.
-------------
Simon Brown
-------------
PPC 7500 + G3 card + ATAPI card + USB card
MacOS Z-9.1 + Remote Access 4.02/CarbonLib 1.6/AppleScript 1.8.3/Smile 1.8.8
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.