• 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: UI Printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI Printing


  • Subject: Re: UI Printing
  • From: "Stockly, Ed" <email@hidden>
  • Date: Thu, 04 Mar 2010 17:41:16 -0800
  • Thread-topic: UI Printing

Title: Re: UI Printing
This works for me.


--(Written using PreFab’s UI Browswer)
tell
application "Mail"
    
activate
    
tell
application "System Events"
        
click menu item "Print…" of menu 1 of menu bar item "File" of menu bar 1 of application process "Mail"
    
end tell
end
tell

HTH,

ES


On 3/4/10 5:09 PM, "Luther Fuller"  wrote:

I don't touch UI scripting with a 10 foot pole ... so, I got my 11 foot pole and tried this ...

tell application "System Events"
if not (UI elements enabled) then
try
set
UI elements enabled to true -- asks for password
on error
display dialog
"Cancelled"
return
end
try
end
if
tell
process "Mail"
click menu item "Print..." of menu "File" of menu bar item "File" of menu bar 1
end tell
end
tell

I always get an error. It seems that "Print..." can't be done. It's just not there.
But, this works just fine, no errors:

click menu item "Close" of menu "File" of menu bar item "File" of menu bar 1

What's going wrong, here?



_______________________________________________
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
 _______________________________________________
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

  • Follow-Ups:
    • Re: UI Printing
      • From: Stan Cleveland <email@hidden>
References: 
 >UI Printing (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: UI Printing
  • Next by Date: Re: UI Printing
  • Previous by thread: Re: UI Printing
  • Next by thread: Re: UI Printing
  • Index(es):
    • Date
    • Thread