Save a file from textEdit - OS X
Save a file from textEdit - OS X
- Subject: Save a file from textEdit - OS X
- From: Chris Prew <email@hidden>
- Date: Mon, 19 Nov 2001 11:49:10 -0600
Hi, I9m writing a script that creates a text file in TextEdit (OS X 10.1)
based on some user input. Then it saves the file to a directory that is also
based on the user input. I9ve used most variations of the save command I
can think of, but its not saving the file. Here it is:
set user_number to "0180"
tell application "TextEdit"
activate
close every document saving no
make new document at the beginning of documents
set the text of the front document to "Various text using " &
user_number
save the front document as "OS_X:docs:0180:newfile.txt"
close every document saving no
end tell
There is no error message while running, and the file looks fine but it
simply doesn9t get saved in the user directory that I want it to save to (or
saved at all, as far as I can tell).
What am I doing wrong?
TIA
Chris