Re: Mail Print GUI
Re: Mail Print GUI
- Subject: Re: Mail Print GUI
- From: Rob Jorgensen <email@hidden>
- Date: Tue, 24 Jun 2003 19:55:01 -0400
At 6:50 PM -0300 6/24/03, Marcus Rodrigues wrote:
Can someone tell me why it does not print?
Please test it...
If someone can make it print I would really appreciate =-)
Thx =-D
if my do_menu("Mail", "File", "Print...") is false then error number
-128
if my do_menu("Mail", "File", "Print...") is false then error number
-128
on do_menu("Mail", "File", "Print...")
try
-- bring the target application to the front
tell application "Mail"
activate
end tell
tell application "System Events"
with timeout of 300 seconds -- 5 minutes
tell process "Mail"
tell menu bar 1
click menu item
"Print..." of menu "File"
tell window "Print"
click button "Print"
end tell
end tell
end tell
end timeout
end tell
return true
on error error_message
return false
end try
end do_menu
If all else fails, you can try a keystroke that activates the default
(Print) button.
tell application "System Events" to keystroke (ASCII character 13)
--
Rob Jorgensen
Ohio, USA
_______________________________________________
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.