• 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: Emmanuel <email@hidden>
  • Date: Fri, 13 Dec 2002 19:14:40 +0100

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.

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.

References: 
 >replace text in chunks (From: Laine Lee <email@hidden>)

  • Prev by Date: Trouble mounting an iDisk
  • Next by Date: Re: Scope
  • Previous by thread: replace text in chunks
  • Next by thread: Re: replace text in chunks
  • Index(es):
    • Date
    • Thread