• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Will this work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Will this work?


  • Subject: Will this work?
  • From: Oakley Masten <email@hidden>
  • Date: Tue, 17 Jun 2008 08:04:48 -0700 (PDT)

Hi All

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



Thanks

Oakley

 _______________________________________________
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

  • Follow-Ups:
    • Re: Will this work?
      • From: Tim Mansour <email@hidden>
    • Re: Will this work?
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: How can I simplify the math in this script?
  • Next by Date: Re: Will this work?
  • Previous by thread: Contacts and Contracts
  • Next by thread: Re: Will this work?
  • Index(es):
    • Date
    • Thread