keystroke "p" using {command down}
– the command is case sensitive, keystroke "P" doesn't work, although the shortcut is called ⌘P.
– the curly braces are not mentioned in System Event's library, is this something oovious?
And I somehow lost the context: Is there a particular reason not to use Mail's print command like
tell application "Mail" to print Window 1
or something similar before
click button 1 of sheet 1 of window 1
?
Thomas
Am 05.03.2010 um 10:54 schrieb Bill Cheeseman:
On Mar 5, 2010, at 4:17 AM, Vittorio wrote:
Yes, it works BUT ... I'm presented with the print menu with the Print button highlighted and waiting for action. What should I add for making this script print the message automagically?
activate application "Mail"
tell application "System Events"
tell process "Mail"
keystroke "p" using {command down}
click button 1 of sheet 1 of window 1
end tell
end tell
Notice that I've used an alternative way to choose the Print menu item.
--
Bill Cheeseman
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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