find a creator

topic posted Tue, February 7, 2006 - 5:00 PM by 
drop this code into the script editor and save it as an app

this is a drag-n-drop script to change the file/creator type for serveral common graphics formats. drop a file or folder on the script and it will prompt you for the file type that you want to associate with and assign the file/creator type accordingly.


-------------------------------------

property FileType : ""
property CreatorType : ""

on open theFiles
tell application "Finder"
activate

set pickProgram to choose from list {"Quark 5", "Quark 6", "InDesign", "Illustrator AI", "Illustrator EPS", "Illustrator PDF", "Acrobat PDF", "Photoshop PSD", "Photoshop TIFF", "Photoshop JPEG", "Photoshop GIF", "Photoshop EPS", "Word DOC", "Word RTF", "Plain TXT"} with prompt ¬
"What kind of file should this be?" OK button name "Go Man" cancel button name "Nevermind"

if (pickProgram as string) = "Quark 5" then
set FileType to "XDOC"
set CreatorType to "XPR3"

else if (pickProgram as string) = "Quark 6" then
set FileType to "XPRJ"
set CreatorType to "XPR3"

else if (pickProgram as string) = "InDesign" then
set FileType to "IDd4"
set CreatorType to "InDn"

else if (pickProgram as string) = "Illustrator AI" then
set FileType to "PDF "
set CreatorType to "ART5"

else if (pickProgram as string) = "Illustrator EPS" then
set FileType to "EPSF"
set CreatorType to "ART5"

else if (pickProgram as string) = "Illustrator PDF" then
set FileType to "PDF "
set CreatorType to "ART5"

else if (pickProgram as string) = "Acrobat PDF" then
set FileType to "PDF "
set CreatorType to "CARO"

else if (pickProgram as string) = "Photoshop PSD" then
set FileType to "EPSF"
set CreatorType to "8BIM"

else if (pickProgram as string) = "Photoshop TIFF" then
set FileType to "TIFF"
set CreatorType to "8BIM"

else if (pickProgram as string) = "Photoshop JPEG" then
set FileType to "JPEG"
set CreatorType to "8BIM"

else if (pickProgram as string) = "Photoshop GIF" then
set FileType to "GIFf"
set CreatorType to "8BIM"

else if (pickProgram as string) = "Photoshop EPS" then
set FileType to "EPSF"
set CreatorType to "8BIM"

else if (pickProgram as string) = "Word DOC" then
set FileType to "W8BN"
set CreatorType to "MSWD"

else if (pickProgram as string) = "Word RTF" then
set FileType to "W8BN"
set CreatorType to "MSWD"

else if (pickProgram as string) = "Plain TXT" then
set FileType to "ttxt"
set CreatorType to "TEXT"
end if

repeat with eachFile in theFiles
set the file type of eachFile to FileType
set the creator type of eachFile to CreatorType
end repeat

end tell
end open
posted by:

Recent topics in "AppleScript"