RE: GUI Scripting and Acrobat 6 Pro
RE: GUI Scripting and Acrobat 6 Pro
- Subject: RE: GUI Scripting and Acrobat 6 Pro
- From: "Wadson, David" <email@hidden>
- Date: Thu, 11 Nov 2004 15:48:29 -0500
Acrobat is scriptable and has an "insert pages" command. I have a script
posted at http://members.shaw.ca/mactech that can merge a folder of PDF
files. Haven't updated the scripts there in quite some time, but the syntax
should be very similar for Acrobat 6 and OS X. You might even luck out and
it works as is, but I doubt it. :-)
The big messy bit of code at the beginning is the raw data necessary to
create a minimal PDF for the pages to be inserted into. And if I recall, the
script expects the pages in the chosen folder to be named in proper
sequential order.
> David Wadson
> IT Manager
> The Chronicle-Journal
>
> ----------
> From: Sean Mills
> Sent: Thursday, November 11, 2004 2:28 PM
> To: email@hidden
> Subject: GUI Scripting and Acrobat 6 Pro
>
> Hello,
>
> I am trying to automate the process of combining multiple pdfs into a
> single pdf. The task is quite straightforward in Acrobat: You first
> select File -> Create PDF -> From Multiple Files..., then select the
> relevant files in the dialog box that appears, and hit OK.
>
> There are two checkboxes in the dialog box. I want to ensure that one
> of them is checked ("Include all open PDF documents"), and the other
> unchecked ("Include most recent list of files to combine").
>
> Here's my problem: using GUI scripting I can select the appropriate
> menu item, but I can't toggle the checkboxes if needed. I also can't
> click *any* button in the dialog box. The strange thing is that I can
> see checkboxes and buttons getting clicked, but the clicks don't seem
> to register. What am I doing wrong?
>
> tell application "Acrobat 6.0.2 Professional" to activate
>
> tell application "System Events"
> tell process "Acrobat"
> tell menu "File" of menu bar item "File" of menu bar 1
> click menu item "From Multiple Files..." of menu
> "Create PDF" of
> menu item "Create PDF"
> delay 2
> end tell -- this works OK
>
> tell window 1 -- "Create PDF from Multiple Documents"
> if (value of checkbox 1) is 1 then --"Include most
> recent list of
> files to combine"
> click checkbox 1
> end if
>
> if (value of checkbox 2) is 0 then --"Include all
> open PDF
> documents" click checkbox 2
> end if
> end tell
> end tell
> end tell
>
>
> Regards,
>
>
> Sean Mills
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> roniclejournal.com
>
> This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden