Comment Spotlight

Mark Smith mark at maseurope.net
Thu Jan 10 13:15:52 EST 2008


Sorry, there was an extra line in there: "put the getCommentAS" of me  
into tAScript...that shouldn't be there.

on mouseUp

   repeat with i = 1 to the number of lines of fld "fldData" -- a  
field that contain a list of file names
     put line i of fld "fldData" into ancienNomdefichier -- old name

     put "tell application" && quote & "Finder" & quote & cr into  
tAScript
     put "get comment of file" && quote & revMacFromUnixPath 
(ancienNomdefichier) & quote & cr after tAScript
     put "end tell" after tAScript

     do tAScript as applescript
     put the result into commentaire

     put line i of fld "fldDatacodées" into nouveauNomdefichier --  
new name
     rename file ancienNomdefichier to nouveauNomdefichier -- don't  
need "do"

     put "tell application" && quote & "Finder" & quote & cr into  
tAScript
     put "set comment of file" && quote & revMacFromUnixPath 
(nouveauNomdefichier) & quote && "to" && commentaire & cr after tAScript
     put "end tell" after tAScript
     do tAScript as applescript

   end repeat
end mouseUp
>



More information about the use-livecode mailing list