• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mail Print GUI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Mail Print GUI (From: Marcus Rodrigues <email@hidden>)

  • Prev by Date: Re: Halting a Script
  • Next by Date: Re: Oh-oh, another victim to scripting Mail [SOLVED!]
  • Previous by thread: Mail Print GUI
  • Next by thread: Re: Recipients in Mail.app
  • Index(es):
    • Date
    • Thread