Re insert file type and creator

Sivakatirswami katir at hindu.org
Tue Jul 29 20:44:43 EDT 2008


Sarah Reichelt wrote:
>
> In my tests, using "the" or not made no difference, but file
> references are a bit strange in AppleScript.
> Try using:
>
> set creator type of alias "Macintosh
> HD:Users:sivakatirswami:Desktop:_temp:a tst creator:image.tiff" to
> "8BIM"
>
> and add the "alias" keyword to the file type line also.
> If that doesn't work, use the word "file" where I have used "alias"
> As far as I can tell, AppleScript has no way of knowing that the
> string you provide is a file reference unless you tell it so.
>   
easy solution: adding "alias" was all that was needed:

tell application "Finder"
   set creator type of alias "Macintosh  HD:Users:sivakatirswami:Desktop:_temp:image.tiff" to "8BIM"
   set file type of alias "Macintosh  HD:Users:sivakatirswami:Desktop:_temp:image.tiff" to "TIFF"
end tell

works fine. Thanks!







More information about the use-livecode mailing list