• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bitmaps and tiff files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bitmaps and tiff files


  • Subject: Re: Bitmaps and tiff files
  • From: Mr Tea <email@hidden>
  • Date: Thu, 07 Feb 2002 10:21:22 +0000

This from Steve Suranie - dated 6/2/02 09:22 pm:

> I am working on an app to convert some images for my company and I was
> wondering if there is a way to programmatically tell if a file is a bitmap
> file or a tiff file. (I need to know so I can call the correct Actionscript
> in PhotoShop - and curse that program for not being Apple scriptable.)

You need the file type property, Steve. This is accessed via the Finder or
the 'info for' command, and is the file's four character type code: "TIFF"
for tiffs, and "BMP " (note trailing space) for bmps. Syntax might look
something like this...

if file type of (info for alias "My HD:My Pix:My Photo") is "TIFF" then
tell app "PhotoShop" to do script "Mess up my Tiff"
else if file type of (info for alias "My HD:My Pix:My Photo") is "BMP " then
tell app "PhotoShop" to do script "Knacker my bitmap"
end if

Mr Tea
--
"Let the pot stand for at least five minutes before serving."
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: reading files
  • Next by Date: Re: Files of folder returns 0 ...
  • Previous by thread: Re: Bitmaps and tiff files
  • Next by thread: Re: Ethernet Hardware Address
  • Index(es):
    • Date
    • Thread