I would like to incorporate a “save as a TIFF file” command into an Apple Script.I imagine that I will be at a place in an Apple Script where I am in Photoshop and I have an image in Photoshop format selected, and I want to save that image in TIFF format. Any help would be appreciated.
save document 1 in file ((ThePath & newName) as string) as TIFF with options {class:TIFF save options, byte order:Mac OS, embed color profile: false, image compression: none, save alpha channels: false, save layers: false} appending lowercase extension with copying
If you already have the script to open the file in Photoshop then create an action in photoshop to save as TIFF. You could also add to action any image editing you want. Get the action to save to specific location ie a Process Folder. Once the image is processed you can get applescript to move it to another location if needed. I use this technique all the time to process 1000’s of images
Tell app “Photoshop CS”
do action “Blah” from “BlahBlah”
end tell
Every time I try and save a file I get a save file dialog…
tell application "Adobe Photoshop CS"
save document 1 in file "Macintosh HD:Users:tombarrett:Desktop:here:DSCF011535.EPS" as Photoshop EPS with options {class:EPS save options, embed color profile:false, preview type:eight bit Mac OS, encoding:high quality JPEG, vector data:true, transparent whites:false}
end tell
You’re getting the dialog because something about the save options require the current file remain in PS and the saved file be saved as a copy. If you don’t want the dialog to show up and you want to keep the save options listed, you need to modify the file before saving, otherwise modify the save options. For EPS, JPEG and a few other, if you have layers, layer masks, layer sets and the like, you’re going to get the save dialog. I’ve got a script around here somewhere that deals with that, I just have to look for it (and no Spotlight at work :().
Sorry for the last post as I did not make myself clear (in a hurry!!) I process 1000’s of images with a mixture of applescript and Photoshop. I have tried scripting photoshop but a much more flexible system is to call photoshop actions from applescript. It means you can change the what the action does without changing the script. The trick is to save (from the action) to a specific folder.
choose folder with prompt "Choose folder from which to process images"
set Pathtoclients to result
global Pathtoclients
set clientlist to list folder Pathtoclients without invisibles
repeat with i from 1 to the number ¬
of items in clientlist
set thisclient to item i of clientlist as string
set Images to (Pathtoclients & thisclient as text)
C_onvertofuji(Images)
end repeat
on C_onvertofuji(Images)
with timeout of 3000 seconds
tell application "Adobe Photoshop CS"
activate
open alias Images
set x to width of document 1
set y to height of document 1
if x is greater than y then
rotate canvas document 1 angle -90
do action "childrens spotlight crop" from "Group Clients_new.atn"
else
do action "childrens spotlight crop" from "Group Clients_new.atn"
end if
end tell
end timeout
end C_onvertofuji
This script makes sure that the image is portrait and process them to specfic folder denoted by the action. Applescript then carries on naming and moving the images.