Re: writing and retrieving comments from document files?
Re: writing and retrieving comments from document files?
- Subject: Re: writing and retrieving comments from document files?
- From: Peter Bunn <email@hidden>
- Date: Fri, 23 May 2003 10:50:52 -0500
>
Can anyone provide an apt example of how file comments can be accessed and
>
manipulated?
Bill:
Don't quite know what you're up to, or whether this is even relevant, but
here are two simple droplets you can play with. The first adds comments
to a file's 'Get Info' window... the second grabs and displays them.
They were written on 8.1, but should also work (I think) on OS X. (Watch
for errant line breaks.) Also note that the 'add comment' script will
overwrite previous comments.
Peter B.
----------
on open these_items
repeat with this_item in these_items
tell application "Finder"
activate
set this_item to this_item as alias
set the_name to the name of this_item
display dialog "File Name: " & "\"" & the_name & "\"" & return &
return & "Add a comment to this file?" & return & return default answer ""
set the_comment to the text returned of the result
set the comment of this_item to the_comment
end tell
end repeat
end open
----------
on open these_items
repeat with this_item in these_items
tell application "Finder"
activate
set this_item to this_item as alias
set the_comment to comment of this_item
display dialog the_comment
end tell
end repeat
end open
-----------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.