This is bedeviling me.
I have some text in an unsaved TextEdit document and want to save it to a specific place on my HD using the first four words as the file name. This is what I have so far (using the desktop as an example location).
tell application "TextEdit"
set fileName to (words 1 thru 4 of document 1 as string) & ".txt"
set docPath to "Mac HD:<<username>>:Desktop:" & fileName
save document 1 in docPath
end tell
I can’t quite see what I’m missing. Thanks.