Re: Capitilization and OSX dictionary
Re: Capitilization and OSX dictionary
- Subject: Re: Capitilization and OSX dictionary
- From: Matthew Stuckwisch <email@hidden>
- Date: Sat, 20 Apr 2002 19:17:26 -0500
I'm quite sure AS can handle it. I've used AS to chew through multi-MB
postscript files in the past; I don't see why you should have problems
here. As for memory consumption, that'll be an issue with whatever
scripting language you use. But with half-gig memory and fifty-gig drives
these days, how big an issue will this really be?
Eheheh...I'm on an iMac DV 400 (Lime, specifically). 27 GBs of HD space,
384 MBs of RAM constantly being used for rendering. Actually, doing a
little playing around I've found I can get an AS code to do it in a little
less time the perl script (AS = about .4 seconds, perl = .6 seconds),
mainly since the AS code is in the same process, but at the same time it
doesn't make as much HD noise (for whatever reason). I figured originally
that AS could eventually chug through it, it was a matter of it being part
of an AS Studio app and I -didn't- want it to go forever. Below is what I'
m finally using:
set r1 to count paragraphs in (read ((path to startup disk as string) &
":usr:share:dict:web2" as alias))
set r2 to count paragraphs in (read ((path to startup disk as string) &
":usr:share:dict:web2a" as alias))
set theReturn to ""
set r3 to r1 + r2
repeat until length of theReturn > 3 and length of theReturn < 28
set lineNum to random number from 1 to r3
if lineNum b $ r1 then
set theReturn to paragraph lineNum of (read ((path to startup disk
as string) & ":usr:share:dict:web2" as alias))
else
set theReturn to paragraph (lineNum - r1) of (read ((path to
startup disk as string) & ":usr:share:dict:web2a" as alias))
end if
end repeat
I could get rid of most of the (path to startup disk)s but I'm too lazy ;-
)
Matthew Stuckwisch
[AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
[IRC]{guifa / G}(esperNET / irc.massinova.com)
_______________________________________________
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.