MACSCRPT Archives

September 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

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

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

Print Reply
Subject:
From:
Philip Aker <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Sun, 24 Sep 2006 19:05:14 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
On 2006-09-24, at 17:20:10, Nobumi Iyanaga wrote:

> I tried with a large text (more than 18000 characters) this script:
>
> 	tell application "Nisus Writer Express"
> 		set the_text to selected text of front document
> 	end tell
>
> 	do shell script "echo" & space & quoted form of the_text & space &  
> "> ~/Desktop/testtext.txt"
>
> This seems to work without problem -- although it adds a  
> supplementary LF at the end of the file.

do shell script "echo -n " & quoted form of the_text & " > ~/Desktop/ 
testtext.txt"

If your text has no apostrophes (') then:

do shell script "echo -n '" & the_text & "' > ~/Desktop/testtext.txt"


Philip Aker
[log in to unmask]

ATOM RSS1 RSS2