File's comments on Mac

Jan Decroos jan.decroos at groepvanroey.be
Mon Apr 7 04:02:01 EDT 2003


You can set comments (files, folders) by Applescript.


(put this in a btn's script)

on mouseUp
  answer file "Give file"
  if it is empty then exit to top
  put revMacFromUnixPath(it) into lFile
  ask "Give comment"
  if it is empty then exit to top
  put it into lComment
  do "tell application "&q("Finder")&CR&\
      	"  open information window of file "&q(lFile)&CR&\
      	"  set current panel of information window of file "&q(lFile)&" to
Comments panel"&CR&\
      	"  set the comment of file "&q(lFile)&" to ("&q(lComment)&")"&CR&\
      	"  close information window of file "&q(lFile)&CR&\
      "end tell" as AppleScript
end mouseUp

function q pText
  return (quote&pText&quote)
end q

Regards,
Jan




More information about the Use-livecode mailing list