MACSCRPT Archives

November 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v1076)
Content-Type:
text/plain; charset=us-ascii; format=flowed; delsp=yes
Date:
Wed, 4 Nov 2009 16:44:33 -0800
Reply-To:
Macintosh Scripting Systems <[log in to unmask]>
Subject:
From:
In-Reply-To:
Content-Transfer-Encoding:
7bit
Sender:
Macintosh Scripting Systems <[log in to unmask]>
Parts/Attachments:
text/plain (24 lines)
I think I tracked it down, thanks Mark.

Here's where the error occurs:

set fileText to read thisFile
tell application "TextCommands" to set fileText to convert linebreaks  
fileText to Unix format

   Because the file is so large, the "fileText" variable is empty, and  
when the script is ready to write the converted text back to the file  
it generates a trapped error that leaves the original file untouched.

So I think what I really need to is a way to convert line breaks on a  
huge file without having to read it into memory.



ES

On Nov 4, 2009, at 8:41am, Mark J. Reed wrote:

> Ed: was this a repeat from a different thread?  Did you make sure the
> file has UNIX line endings?

ATOM RSS1 RSS2