Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: GUI Scripting: accessing menus causes error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUI Scripting: accessing menus causes error



At 3:20 pm -0600 20/6/03, Henrik Boes wrote:

Hello,

I am still trying to get at least a bit of a handle on GUI scripting and am running into the following error when accessing menus:

System Events got an error:
NSReceiverEvaluationScriptError: 4

The script in question is the following:

tell application "Preview"
activate
end tell
delay 10
tell application "System Events"
tell process "Preview"
click menu item "Open" of menu "File" of menu bar 1
delay 1
end tell
end tell

Try

tell app "System Events"
tell process "Preview"
set frontmost to true
tell menu bar 1 to click menu 3's second menu item
end
end


Don't ask me why.


JD



.
_______________________________________________
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: 
 >GUI Scripting: accessing menus causes error (From: Henrik Boes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.