PreFab...Player...Cool Uses...Photoshop...

Simple Example, Batch to GIF

Here's a very simple batch processing example. Photoshop can only save a file as GIF if it's indexed color or grayscale; this script assumes that's the case. Other examples demonstrate using Player to check to see if a conversion is necessary, and controlling Photoshop to do the required steps.
-- batch convert a folder full of images to GIF
-- the files must be indexed color or grayscale

set batchFolder to choose folder
tell application "Finder" to set listOfFiles to (get every file of folder batchFolder) as list
tell application "Adobe Photoshopª 3.0" to activate

repeat with imageFile in listOfFiles
	tell application "Finder" to open imageFile using application file id "8BIM"
	-- the above specifies Photoshop's creator code so that it can open non-Photoshop files
	tell application "PreFab Playerª"
		do menu menu item "Save As" of menu "File"
		do menu popup item "CompuServe GIF" of popup "Format"
		type {down arrow, ".GIF", enter} -- add suffix
		do menu menu item "Close" of menu "File"
	end tell
end repeat

| Top |

Player and Photoshop 4| Prev | Home | Next |MacUser Example (for 1.1)

Updated on 10/28/96 by Scott S. Lawton (

Copyright 1993-97, PreFab Software, Inc. All Rights Reserved.

This site built and maintained using Stage Three, a set of custom Frontier scripts.