Re: UI Scripting: Save as PDF
Re: UI Scripting: Save as PDF
- Subject: Re: UI Scripting: Save as PDF
- From: Hugh Dixon <email@hidden>
- Date: Thu, 23 Jan 2003 09:41:42 +0000
on 22-1-03 20:01, Jared at email@hidden wrote:
>
On Wednesday, January 22, 2003, at 04:19 AM, Dixon, Hugh - BUP wrote:
>
>
> I had to get a count of all the UI elements of the Print window and
>
> then
>
> work through each by index asking for their own "child" elements
>
>
Could you give an example of this? It's not the same with TextEdit as
>
there is another level of Unknowns. I think if I get that, I can use
>
your code. I'm not sure. Anyway, how can I work through the indices
>
like that?
>
I emailed Jared off list with the details. Here's the final script:
tell application "System Events"
tell process "TextEdit"
set frontmost to true
click menu item "Print..." of menu "File" of menu bar 1 -- three
full
stops after "Print"
-- or if this is too much, keystroke "p" with command down
delay 1
click button "Save as PDF
" of UI element 4 of UI element 1 of
window
"Print" of window "untitled" -- ellipsis after "PDF"
delay 1
click button "Save" of window "Save to File"
end tell
end tell
Hugh
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.