Re: Printing to PDF File
Re: Printing to PDF File
- Subject: Re: Printing to PDF File
- From: "Michael D. Conner" <email@hidden>
- Date: Mon, 14 Nov 2005 11:28:47 -0600
- Thread-topic: Printing to PDF File
GUI scripting is a great idea, I just wish it would work better and more
consistently.
I don't have Tiger installed but in Panther the following script works.
tell application "Microsoft Word"
activate
end tell
tell application "System Events"
tell application process "Microsoft Word"
click menu item "Print..." of menu "File" of menu bar item "File" of
menu bar 1
delay 1
click button "Save As PDF" of UI element 4 of window "Print"
delay 2
click button "Save" of window "Save to File"
end tell
end tell
Getting the syntax can often be difficult. I have used both Apple's UI
Element Inspector and PreFab's UI Browser. The latter is nice in that it
will give you a script snippet and sometimes provides better info than
Element Inspector.
One problem I've had in the past was getting the file name of the PDF file
set if I didn't want the default. I ended up having to paste it in using a
keystroke command. The other problem you might have is setting the folder to
save to.
Hope this helps.
Mike
on 11/11/05 3:23 AM, Wayne Melrose at email@hidden wrote:
> Just wondering if anyone has some successful GUI script to print to
> PDF file..
>
> I'm trying to batch print MS Word files to pdf, I can't seem to find
> any script to do this, and GUI scripting is my next best choice, I
> can't find any syntax for GUI scripting Tiger's print menu.
>
> Any help would be appreciated..
>
> Wayne
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> uristate.edu
>
> 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