Re: UI Printing
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. |
_______________________________________________
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