Publi-Script Forums

Applescript / Javascript => Scripting in general => Topic started by: Jean-Marie Schwartz on October 21, 2010, 08:17:42 AM

Title: File type and Creator type
Post by: Jean-Marie Schwartz 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