Re: UI scripting question
Re: UI scripting question
- Subject: Re: UI scripting question
- From: Jim Brandt <email@hidden>
- Date: Fri, 18 Jul 2008 13:12:20 -0500
the error is:
System Events got an error: NSReceiverEvaluationScriptError: 4
The same error I've gotten when I mistype an element name or or reference a nonexistent element or some other similar error.
Putting a delay in front of the "click button 2 ..." line didn't help.
Jim Brandt
I've tried this:
tell application "System Events" tell process "Safari" click menu item "New Window" of menu 1 of menu bar item "File" of menu bar 1 delay 1 click menu item "Page Setup" of menu 1 of menu bar item "File" of menu bar 1 click button 2 of radio group of sheet 1 of front window keystroke return end tell end tell
The page setup dialog comes up but it doesn't change to landscape mode. if I use: click button 2 of radio group 1 of sheet 1 of front window I get a System Events error.
Am I just out of luck on this one?
What is the System Events error? If it's that a button with index 2 doesn't exist, or words to that effect, then perhaps the Page Setup sheet hasn't had time to come up. Try inserting 'delay 1' before the 'click button 2 ...' statement.
|
_______________________________________________
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