• 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: Bill Cheeseman <email@hidden>
  • Date: Fri, 5 Mar 2010 10:48:30 -0500


On Mar 5, 2010, at 10:00 AM, Thomas Fischer wrote:

But something else is strange:
If I run

activate application "Mail"
tell application "System Events"
tell process "Mail"
keystroke "p" using {command down}
# click window 1
# click button 1 of sheet 1 of window 1
end tell
end tell

nothing happens until I move the mouse, click it or perform some other action.

That's the bug I just mentioned to Luther a moment ago. The reason you see the bug (the delay in opening the Print panel) in the GUI Scripting script is that GUI Scripting is emulating manual control of the application's UI. GUI Scripting is based on Apple's accessibility API, which attempts (with considerable success) to imitate exactly what a user would do with the keyboard and the mouse. So you get the same bug whether you choose Print manually or by GUI Scripting, but you don't get it when you use Mail's built-in AppleScript commands.

--

Bill Cheeseman
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

References: 
 >Re: UI Printing (From: Stan Cleveland <email@hidden>)
 >Re: UI Printing (From: Vittorio <email@hidden>)
 >Re: UI Printing (From: Bill Cheeseman <email@hidden>)
 >Re: UI Printing (From: Thomas Fischer <email@hidden>)
 >Re: UI Printing (From: Bill Cheeseman <email@hidden>)
 >Re: UI Printing (From: Thomas Fischer <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