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]