Help with scripting text editor with comments from file?
Help with scripting text editor with comments from file?
- Subject: Help with scripting text editor with comments from file?
- From: "T.J. Mahaffey" <email@hidden>
- Date: Tue, 06 Mar 2001 09:17:08 -0600
Can anyone tell me what I'm doing wrong here?
I'm trying to create a droplet that will perform the following on the items
dropped on it:
Create a text file, name it the same as the file's name, set the text of the
file to the text from the file's comment window, and save the file to the
HD. I'm using Tex-Edit Plus, but any insight you folks could give will apply
to most any small text editor like it.
Here's my script that's error'ing out on the 7th line where it makes the new
text document.
on open newItems
repeat with allFiles in newItems
tell application "Finder"
set itemName to name of allFiles
set myComment to ((comment of selection) as text)
tell application "Tex-Edit Plus"
make new document with properties {name:itemName,
text:myComment}
save document in file "VST 30gb:itemName" as text
close document itemName
end tell
end tell
end repeat
end open
Many thanks.
T.J. Mahaffey