• 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
Fw: Referencing the Print window in InDesign
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fw: Referencing the Print window in InDesign


  • Subject: Fw: Referencing the Print window in InDesign
  • From: Brett Conlon <email@hidden>
  • Date: Mon, 16 Jul 2007 13:45:57 +1100


Daing it!

The below issue is kinda back to haunt me. I have the new InDesign script I wrote working beautifully on my G4 Laptop (10.4.10) but when I ran it on a studio Mac (10.3.9) to test it the script was choking on the "repeat" waiting for the "Print" window to appear.

I then took it to another Mac (also 10.3.9) and it was having the same issue. When I took it to a third Mac (this one running 10.4.8) the script ran through completely as it did on mine.

It seems that any of the System Events calls to window elements in InDesign on 10.3.x are failing. If I run the following script on a 10.3 setup it errors with the NSReceiverEvaluation...4 error. If I run it on a 10.4.x setup it works:

tell application "Adobe InDesign CS2"
        tell application "System Events"
                tell process "InDesign"
                        set wcount to count of windows
                end tell
        end tell
end tell

However, keystroking "p" works... just nothing else from there. Does anyone else have the same probs?

The reason I'm printing to PDF is that the client wants all PDF's sent to them for approval as A4 size. I've written the script to test for the page size and shrink-to-fit if larger than A4 and leave it as-is if smaller. If I export to PDF I have no control over the size of it (as far as I can see) so I'm forced to PRINT to PDF. Our HiRes Pre-Press PDFs are exported as 100% size though.

I know the client can simply print the PDF at their end fit-to-paper but they don't want this option because they have a pretty tight email box size restriction so our large poster PDF files, even though printed as low-res, cause delivery failures. The only other option I can think of is to direct the script to print a PostScript file into a Distiller watched folder but that requires launching Distiller and so far we've been able to create all PDF files without having to launch it (extra time launching and extra RAM usage).

All suggestions most welcome.

Coj


----- Forwarded by Brett Conlon/HU/AU/SonyDADC on 16/07/07 12:25 PM -----
Brett Conlon/HU/AU/SonyDADC

12/07/07 01:06 PM

To
Apple Script
cc
Subject
Re: Referencing the Print window in InDesignLink




Hi Shane,

Thanks again for your input!

Bringing up the print window is the easy part... actually I may have just stumbled on what my problem was...

My initial tests for the Print window wasn't inside the "system events" tell block, therefore it was only recognising the document windows open in InDesign. Using the below script I get the Print window appearing and the "Printer..." button presses but, however, no Apple Print window appears, so I may have to do like what I do in the Quark Print window and use Extra Suites to move mouse and click. When I include "set wcount to count of windows" under the click button line it now includes the Print window in the count.

tell application "Adobe InDesign CS2"
        activate
        tell application "System Events"
                tell process "InDesign"
                        keystroke "p" using {command down}
                        repeat until exists (window "Print")
                        end repeat
                        click button "Printer..." of window "Print"
                end tell
        end tell
end tell

Cheers,

Coj




Shane Stanley <email@hidden>

12/07/07 12:07 PM

To
Brett Conlon <email@hidden>
cc
Subject
Re: Referencing the Print window in InDesign





On 12/7/07 10:48 AM, "Brett Conlon" <email@hidden> wrote:

> However, when I update my Xerox Splash RIP script to include
> InDesign I will have the same need - to access Apple's Print window so
> that I can change the presets depending on what is needed at the Splash
> RIP (eg. duplexing, thick stock, colour management etc.).

Good luck. You might see if you can get around it by using different PPDs,
or some kind of pdfmrk file -- anything but GUI scripting.

Theoretically, you should be able to bring up ID's print dialog with:

   select menu item "Print..." of submenu "File" of menu 1

However, it seems to bring it up and hit Print immediately.

--
Shane Stanley <email@hidden>
<http://scriptingmatters.com/aspro>




 _______________________________________________
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

  • Prev by Date: Re: Setting TextEdit Insertion point
  • Next by Date: Making CD invisible
  • Previous by thread: Re: Referencing the Print window in InDesign
  • Next by thread: InDesign CS2: Problem with launching scripts out of the script window
  • Index(es):
    • Date
    • Thread