Newbie question

Joined
Dec 30, 2005
Messages
22
Reaction score
0
Hey, I'm pretty new to AppleScript. I need to know how create a TextEdit document with name "ProgramFile" at "Macintosh HD:Users:KmanCat"...I just can't figure out the syntax...:(
 

Ric

Joined
May 14, 2004
Messages
4,260
Reaction score
5
Hi there and welcome !

TextEdit, unfortunately is not very AppleScript aware...

but here's one way you can do it, when TextEdit opens it normally 'opens' a blank document, quit textEdit then try this script...

tell application "TextEdit"
activate
save the front document in "Macintosh HD:Users:KmanCat:programFile.txt"
end tell

If you want to do a lot of scripting then have a look at TextWrangler it's free and a lot more powerful than TextEdit, and it's AppleScriptable !

Happy New Year !

Ric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top