Re:Mail Print GUI
Re:Mail Print GUI
- Subject: Re:Mail Print GUI
- From: Kok Ooi Kong <email@hidden>
- Date: Mon, 28 Jul 2003 16:06:16 +0800
I'm not sure if you have found the solution, but the following works -
though I'm not sure how useful is this script. I notice that you are
developing a handler. I tried to keep to your style but I have other
suggestions in it as well as text. Please note that each program has
its own UI element number assigned differently and thus the script that
works with one may not work in another. Thus, keystrokes seem more
likely to be a viable choice.
-- bring the target application to the front
tell application "Mail"
activate
tell application "System Events"
tell process "Mail"
set frontmost to true
set frWdw to the name of window 1 as string
click menu item "Print..." of menu "File" of menu bar 1
-- or keystroke p with command down
delay 5
tell window frWdw
tell window "Print"
click button "Print" of UI element 4 of UI element 1
delay 10
end tell
end tell
-- or keystroke return to replace the whole para from tell
window frWdw
end tell
end tell
end tell
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
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.