Re: Will this work?
Re: Will this work?
- Subject: Re: Will this work?
- From: Philip Aker <email@hidden>
- Date: Tue, 17 Jun 2008 08:26:02 -0700
On 08-06-17, at 08:04, Oakley Masten wrote:
I found this at MacTECH in an article on scripting PhotoShop.
I can not get it to compile
It fails on the set theFormat line.
I don't understand that line either.
Can anyone explain what is going on there?
Dose it to work on your system or is it just mine?
OS 10.4.11
Figure 5. Photoshop's Save For Web Export Options
The following example code will save an image in JPEG format via
Photoshop's Save For Web technology, using specified export options.
Due to a compilation issue with the as property of the save for web
options class, in order to specify a file format when exporting in
this format, a tricky workaround is necessary. Thanks to Nigel
Garvey's insightful MacScripter.net AppleScript BBS <http://bbs.applescript.net
> post for this great workaround!
tell application "Adobe Photoshop CS2"
set theFormat to run script "tell application \"Photoshop\" to
return {"class fltp":JPEG}"
set theExportOptions to {class:save for web export options,
interlaced:true, quality:30} & theFormat
tell theDocument
export in "Macintosh HD:Users:bwaldie:Desktop:My_Document.jpg"
as save for web with options theExportOptions
end tell
end tell
The main problem is here:
export in "Macintosh HD:Users:bwaldie:Desktop:My_Document.jpg" as save
for web with options theExportOptions
because Mr Waldie's home folder is not the same as yours.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden