• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: replace text in chunks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: replace text in chunks
      • From: Laine Lee <email@hidden>
  • Prev by Date: Re: Trouble mounting an iDisk
  • Next by Date: Re: Energy Saver/OS 10.2.2
  • Previous by thread: Re: replace text in chunks
  • Next by thread: Re: replace text in chunks
  • Index(es):
    • Date
    • Thread