Mar 28, '07 07:30:00AM • Contributed by: ecbtln
Whenever I open TextEdit (rarely), I am dismayed to find out that when I save the file, it only gives me four choices: RTF, HTML, Word, and Word XML. But what happens when I don't care about the formatting, and all I want is plain old txt? For a while I found myself opening a blank text file on my desktop downloaded from a website and then doing File » Save As, or even opening up Terminal and typing in touch Desktop/file.txt.
Well, today I got off my lazy butt and wrote a script (two lines of code). I then put it into Automator and saved it as a plug-in in the Finder's contextual menu. Here's the script:
do shell script "touch ~/Desktop/file.txt"
do shell script "open ~/Desktop/file.txt"
What the script does is first create a file named file.txt and puts it on the desktop, then opens it in TextEdit. I suppose someone could save the script as an application and have it open on a keyboard shortcut through Butler or Quicksilver as well. Just copy the code into Script Editor or Automator in a Do Shell Script action.
[robg adds: There are third-party tools that make this process pretty simple, too. DocumentPalette and NuFile are two that come to mind.]
