Re: File Comments in OS9 and X
Re: File Comments in OS9 and X
- Subject: Re: File Comments in OS9 and X
- From: Mr Tea <email@hidden>
- Date: Tue, 23 Apr 2002 21:36:55 +0100
This from Simon Topliss - dated 23/4/02 07.06 pm:
>
Could someone (Chris N?) please just confirm that there is technically no
>
way to get comments from the file info for comments added in Mac OS 9 on Mac
>
OSX and vice versa.
This may be of some use to you, Simon.
This is a script that stores the comments of items in folders dropped onto
it in OS 9, then finds the folder and restores the comments when you run it
in OS X. It's still in primitive form, and you'll need to adapt it for your
own environment, but if the comments that you need to save are stored in
relatively few folders, it should do what you want quite effectively. And if
you've made yourself an OS X 'startup items folder' (I recommend it - a
script in login items opens the contents at login) you can slip your applets
containing the stored comments from OS 9 into it, and have them run
automatically when you fire up OS X.
property theComments : {}
property targetFolder : {}
on open {theFolder}
set theDisk to path to startup disk
if theDisk is alias "Basement!:" then
set my targetFolder to theFolder
tell application "Finder"
set my theComments to comment of every item of theFolder
try
set name of file ((path to me) as string) to name of theFolder & "-X"
end try
end tell
end if
end open
set theDisk to path to startup disk
if theDisk is alias "Mezzanine!:" then
try
set theList to list folder targetFolder without invisibles
on error
set theWords to "The target folder has not been set"
display dialog theWords buttons {"Drat!"} default button 1
end try
set tally to 1
repeat with theName in theList
set theItem to ((targetFolder as string) & theName) as alias
tell application "Finder"
set comment of theItem to (item tally of theComments)
end tell
set tally to tally + 1
end repeat
tell application "Finder"
try
set theRestorer to file ((path to me) as string)
set name of theRestorer to name of theRestorer & "*"
end try
end tell
else
set theWords to "Run this script in OS X to restore comments"
display dialog theWords buttons {"Just Checking"} default button 1
end if
HTH
Mr Tea
--
_______________________________________________
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.