Player
Cool Uses
Photoshop
-- example script for Player 1.1 & Photoshop 3 -- task: convert a folder full of PICT images to CMYK, save as TIFF, omit the ".pict" extension -- note: the folder is hardcoded to a certain value; that's what the customer wanted! -- set theFolder to choose folder tell application "Finder" to set theDisk to (name of startup disk) & ":" set theFolder to theDisk & "Movie.Books:Conversions" tell application "Finder" to set listOfFiles to (get every document file of folder theFolder) as list tell application "Adobe Photoshopª 3.0" to activate waitForPhotoshop() repeat with theFile in listOfFiles tell application "Finder" to open theFile 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 "CMYK" of menu "Mode" with repeat until successful do menu menu item "Save As" of menu "File" with repeat until successful set filename to item text of (get info dialog item 10) -- 10 is the id of the filename text box if filename ends with ".pict" then -- NOT case sensitive set filename to text 1 through ((length of filename) - 5) of filename type filename end if do menu popup item "TIFF" of popup "Format" type enter if exists button "Replace" then click button "Replace" end if click radio button "Macintosh" type enter do menu menu item "Close" of menu "File" with repeat until successful end tell end repeat on waitForPhotoshop() set PhotoshopInFront to false repeat while not PhotoshopInFront tell application "Finder" -- use "application" to be portable across machines (where the app may have a different name) -- need the name for "process" to work, get it from the path set PhotoshopInFront to (frontmost of process (name of (path to application "Adobe Photoshopª 3.0"))) end tell end repeat end waitForPhotoshop
Set Maximum Height
Copyright 1993-97, PreFab Software, Inc. All Rights Reserved.
This site built and maintained using Stage Three, a set of custom Frontier scripts.