1 Reply Latest reply on Mar 17, 2016 9:49 AM by Silly-V

    AppleScripting Printer presets

    lanced49429012

      I am wanting to set a printer preset and then print with that preset/printer, but I seem to be having a problem that illustrator ignores the commands. Of course I may be writing it wrong.

       

      tell application "Adobe Illustrator"

        activate

        set thisdoc to current document

       

        set printOptions to ¬

        {class:print options, print preset:"Proof", printer name:"HP LaserJet 200 color M251nw (6243AE)"}

        print thisdoc options printOptions

      end tell

        • 1. Re: AppleScripting Printer presets
          Silly-V Adobe Community Professional

          I really can't stand AS because of this kind of thing.

          Of course I may be writing it wrong.

          You can have a situation where you write everything just fine, but due to some picky crap, it completely doesn't work.

          For this reason I typically would just use AS to do Javascript inside of my target application.

          By the way, one of my hard-learned lessons (how many hours down the drain was it?), I learned that this:

          set myApp to application "Adobe Illustrator"

               tell myApp

                   do javascript myJS

          does not work, where as this does work:

          tell application "Adobe Illustrator"

              do javascript myJS