benlong
#1
I’m porting an Automator action from AppleScript Studio to ASOC and have run into a problem.
I’ve been using this code:
tell application "Finder"
set theInfo to info for anItem
set theComment to get comment of anItem
end tell
to get the Spotlight comment of a specific file, but that doesn’t seem to work in ASOC. What should I be doing instead?
Thanks!
StefanK
#2
Hi,
the info for line is not needed at all.
It works fine with a file specifier instead of an alias specifier
tell application "Finder"
set theComment to comment of file (anItem as text)
end tell
benlong
#3
Thanks Stephan, that’s a good tip. Unfortunately, it still seems to be crashing out at that line. I don’t get an error there, the flow just stops.
StefanK
#4
could you post a bit more of code (e.g. where comes anItem from) and perhaps the error log
benlong
#5
Actually, I got it working by doing this:
set theComment to comment of file (anItem as alias)
Thanks for your help!