Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Easily save TextEdit documents via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily save TextEdit documents via AppleScript
Authored by: grasshoppermouse on Sep 23, '08 04:09:18AM
I do something similar. Here is my solution:

1. Cut and paste the following script into Script Editor:


set note_name to text returned of (display dialog "New note name:" default answer "")
if note_name is not "" then
	tell application "Finder"
		set the_folder to ((folder of the front window) as alias)
		set the_file to make new file at the_folder with properties {name:(note_name & ".txt")}
		open the_file
	end tell
end if

2. Using Script Editor, save it as an application to ~/Library/Scripts. When saving, be sure and de-select the "Startup screen" option.

3. Drag the icon of the compiled app to the toolbar of the Finder window. Wait a second or two until you see the "+", and then release. The functionality of this script is now available in every Finder window.

4. Optionally create a folder named "Notes" -- mine is inside my Documents folder. Drag this folder to the sidebar of the Finder. This folder will now be accessible in any Finder window.

To use, simply click the icon in the Finder toolbar and a small dialog box will open asking for a file name. Provide one, and a text file will be created in whatever folder you are currently viewing and then opened in your default text editor (probably Text Edit). To create a new note in your Notes folder, first click on the folder icon in the sidebar.

Use spotlight to find your notes.

[ Reply to This | # ]

Easily save TextEdit documents via AppleScript
Authored by: qprfact on Oct 22, '08 08:49:58AM

This hint looks like it will solve my issue, but perhaps someone can confirm?

I use an Applescript to take lyrics from iTunes and convert to TextEdit files.

If I select multiple music files, it produces multiple TextEdit files on my desktop - all good. I then want to save them all, but they need to be "Saved as", which takes time (a lot of it!)

Will this script save all the TextEdit files created under the Artist - Track Title format that appears in the title bar of the window?



[ Reply to This | # ]