Auto. Create & Save TextEdit File

3 11 2007

set folderpath to "Macintosh HD:Users:Phoenix:test:"
tell application "TextEdit"
set myDoc to document 1
set text of myDoc to "Hello World"
set filepath to folderpath & "hello.txt"
close myDoc saving yes saving in filepath
end tell




One response

13 03 2008

Does anyone know how to modify this script to save the file as format “Word 2007 (docx)”?
This is a save option within Leopard’s TextEdit but would to automate the process just like the above script (saving and closing the file). Preferably would like to know know how to modify the script without writing keystrokes, but if necessary, so be it!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: