We Recommend

Beginning AppleScript (Programmer to Programmer) Beginning AppleScript (Programmer to Programmer)
Geared toward programmers with no prior development knowledge, Beginning AppleScript serves as a comprehensive guide to using AppleScript on the Mac OS X platform. This title introduces the reader to AppleScript, and then illustrates how to efficiently start writing scripts through sample programs as each concept is introduced.


Ballyhoo


Posted By

splorp on 06/30/06


Tagged

file mac applescript filetype filecreator type creator macintosh script


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

luxuryluke
splorp
vonkinder


Get Mac File Type & Creator


Published in: AppleScript 


Displays the file type and file creator designations for any Mac OS document or application.


  1. on open (fileList)
  2. tell application "Finder"
  3. set myFile to item 1 of fileList
  4. if kind of myFile is not "folder" then display dialog ¬
  5. "file creator: " & (the creator type of (myFile as alias)) & return & ¬
  6. "file type: " & (the file type of (myFile as alias))
  7. end tell
  8. end open

Report this snippet 

You need to login to post a comment.