Re: replace text in chunks
Re: replace text in chunks
- Subject: Re: replace text in chunks
- From: Andy Wylie <email@hidden>
- Date: Tue, 17 Dec 2002 19:45:32 +1300
on Fri, 13 Dec 2002 19:14:40 +0100 Emmanuel wrote:
>
At 11:09 AM -0600 13/12/02, Laine Lee wrote:
>
>This script works fine if search text and replace text are the same length.
>
>What can I do to make it work if they have different lengths?
>
>Or is there a better way to perform this on files larger than 32k in OS X
>
>without using third party scripting additions?
>
>Thanks.
>
>
>
>property search_string : "12"
>
>property replacement_string : "36"
>
>
>
> set endChunk to startChunk + 4024
>
>
I can't think of a better way. Only significant improvement I could
>
find out is, 4024 may be too prudent: to make a list of 4000 items,
>
you need 8000 characters (since search_string has 2), so you could
>
make longer chunks.
>
set endChunk to startChunk + ((count search_string)* 4000)
I see write out of memory about 1.5MB
_____________________________ Andy
_______________________________________________
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.