I’m working on a script that automates the process of building a graphic navigation.
I was hoping that someone might be able to help me clean it up a bit… and perhaps even help me hop over a few hurddles.
Ideally i’d like this script to save each img via SaveToWeb… but i know this can’t happen. Is there a way to insert a call to a PS action that does the SaveToWeb? The trick would be passing the name from the applescript to the action.
thanks for any help you can offer.
jc
set theFile to (choose file with prompt "Select a file to read:" of type {"TEXT"})
open for access theFile
set fileContents to (read theFile)
set mystring to fileContents
close access theFile
tell application "Adobe Photoshop 7.0"
set the_layer to make art layer in current document with properties {kind:text layer, name:"off-state"}
tell text object of the_layer
set font to "FFFIntelligentThinCondensed"
set stroke color to {class:RGB color, red:255.0, green:255.0, blue:255.0} -- off-state color
set size to 8
set alignment to left
set position to {27, 14}
end tell
repeat with eachName in (paragraphs of mystring)
set eachName to text of eachName
set contents of text object of the_layer to eachName
save document 1 in ((((path to desktop) as string) & eachName & ".gif") as file specification) as CompuServe GIF with copying
end repeat
delete the_layer -- this starts things over for the rollover state
set the_layer to make art layer in current document with properties {kind:text layer, name:"over-state"}
tell text object of the_layer
set font to "FFFIntelligentThinCondensed"
set stroke color to {class:RGB color, red:0.0, green:0.0, blue:0.0} -- over-state color
set size to 8
set alignment to left
set position to {27, 14}
end tell
repeat with eachName in (paragraphs of mystring)
set eachName to text of eachName
set contents of text object of the_layer to eachName
save document 1 in ((((path to desktop) as string) & eachName & "_over.gif") as file specification) as CompuServe GIF with copying
end repeat
end tell