Poking around in AppleScript shows that the new document’s path is After editing the file the first time I try to save the file I get the above error. tell application “TextEdit” activate make new document set theDate to current date set text of document 1 to theDate as text save document 1 in. TextEdit was running, but it was hidden (therefore all windows are hidden). This just means you hid TextEdit from view. Running your script.
|Published (Last):||4 June 2013|
|PDF File Size:||16.68 Mb|
|ePub File Size:||11.34 Mb|
|Price:||Free* [*Free Regsitration Required]|
Use spotlight to find your notes. I put this line before your code. Here is the script: Your second solution closes out of the hidden windows completely, instead of simply making them txetedit. Seems a little weird though. Why “don’t own the file”? I often dump ideas, questions, and answers in TextEdit files which I later use Spotlight to retrieve.
Drag this folder to the sidebar of the Finder. Powered by the Parse.
I appreciate your answer. If I select multiple music files, it produces multiple TextEdit files on my desktop – all good.
Simple Applescript: Create a .txt file
The path has to be set after the document’s created: My minor addition to your code deals wth this fact, but of course there may be better ways to do what you want. In any case, it it is apolescript an obstacle to understanding things. To create a new note in your Notes folder, first click on the folder icon in the sidebar.
This is my very first applescript.
How can I use AppleScript to tell TextEdit to attach a file? – Ask Different
I find it a handy little app in its own right, but its AppleScript implementation certainly leaves a lot to be desired!
I thought so too, but using a note-keeping app helps to keep all these in one place, so you don’t have to worry about where to look. Macworld MacUser iPhone Central. Applescriph as a guest Name. Hi, I don’t like the proper way. The first question to answer is why were the windows missing from your first screenshot not visible? In Automator I have 2 action: Also, I’ve found by searching that people have asked and written about the two phrases shown after the image of the error message below, textedti I haven’t found anything recent.
This is what my screen currently looks like after the AppleScript is triggered:. I then want to save them all, but they need to be “Saved as”, which takes time a lot of it!
There’s only three possibilities: I tested it, and it works as described. I use automator to launch the script as I drop new files to a folder Folder action.
Simple Applescript: Create a .txt file | MacRumors Forums
I haven’t tested the answer by Mockman, but it may also be a good solution. 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.
Basically, what I was trying to do with my answer was explain why your script resulted in the behaviour you were experiencing and why that was to be expected. PizzaCake on Sep 23, ’08 Anyway, I said thanks, and asked why the close and reopen?