Re insert file type and creator

Sivakatirswami katir at hindu.org
Tue Jul 29 00:28:11 EDT 2008


J. Landman Gay wrote:
> Sivakatirswami wrote:
>> Aloha,
>>
>> semi urgent...
>>
>> Recent upgrade on the fab photo processing tool DXO got us in trouble 
>> because it's outputting .tiff files with no resource fork and 
>> dropping the creator and type on OSX 10.5.4
>>
>> The pre-press team is asking me if i can write a widget to poke TIFF 
>> and 8BIM back into the type and creator slots of the resource fork...
>>
>> Anyone know if we can do this in revolution?
>
> You've probably already done this with the AppleScript solution, but 
> for future reference, you can set a Mac file type using the "filetype" 
> property. So all you'd need to do is something like this:
>
> set the filetype to "????TIFF"
> put url ("binfile:myfile") into url ("binfile:myNewFile")
>
> Just for the record, if you are trying to set a file type on stacks, 
> you need to use the "stackfiletype" instead.

I saw the docs on setting the filetype as an environment global before 
writing, andyes:

global gCTCPath

on mouseUp
put fld "Listing" into tFiles

repeat for each line x in tFiles
put gCTCPath &"/"& (item 1 of x) into tFile
set the filetype to "8BIMTIFF"
put url ("binfile:"&tFile) into url ("binfile:"&tFile&"-1")
end repeat
end mouseUp

works fine. But we prefer to avoid copying these files (some are huge) 
if possible

For the applescript solution, my rev code is working but not my 
applescript (there is no "the" in the
syntax, which i found on the web:)

My script builds this script which should work (I always test in 
Applescript itself...)

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

generates an error:

Can’t set «class fcrt» of "Macintosh 
HD:Users:sivakatirswami:Desktop:_temp:a tst creator:image.tiff" to "8BIM".

And since I don't have a clue what "class fcrt" means... I'm stuck.










More information about the use-livecode mailing list