Author Topic: File type and Creator type  (Read 1635 times)

0 Members and 1 Guest are viewing this topic.

Offline Jean-Marie Schwartz

  • Sr. Member
  • ****
  • Posts: 436
  • Karma: 6
  • Gender: Male
File type and Creator type
« on: October 21, 2010, 08:17:42 AM »
Hi,

I've written some scripts to get (1) and to set (5+) file type and creator type of files showing as Unix exe… so I just drop them on the droplet and done. The problem is when I drop the final files on the Get droplet again, the Creator type show as "missing value" instead of the value I put.
Can anybody see any reason why?
Here are both codes:
Code: [Select]
on open file_list
repeat with this_file in file_list
try
tell application "Finder"
set FT to file type of file this_file
set CT to creator type of file this_file
end tell
on error error_message
display dialog error_message
end try
beep 1
display dialog "File type : " & FT & return & "Creator type : " & CT giving up after 5
end repeat
end open

Code: [Select]
on open file_list
repeat with this_file in file_list
try
tell application "Finder"
set file type of file this_file to "XPRJ" -- Projet QuarkXPress
set creator type of file this_file to "XPR3" -- XPR3 = Quark
end tell
on error error_message
display dialog error_message
end try
end repeat
beep 1
end open
Jean-Marie Schwartz
May the Schwartz be with you :-)

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.8.5 • QuarkXPress 9.5.4.1 • Adobe CS5 =