• 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: 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


  • Subject: Re: GUI Scripting: accessing menus causes error
  • From: Barbara Mueller <email@hidden>
  • Date: Sat, 21 Jun 2003 11:18:50 +0200

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

Hallo,

According my experience with GUI scripting, Preview is not the only application causing this error.

The following way almost all applications (exept Script Editor) can access menus:

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

HTH
Barbara
_______________________________________________
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.

  • Prev by Date: Re: Why so few OSX Additions?
  • Next by Date: Re: Oh-oh, another victim to scripting Mail (how do I restart Mail with AS?)...
  • Previous by thread: Re: GUI Scripting: accessing menus causes error
  • Next by thread: RE: Applescript or ASS app as protocol helper?
  • Index(es):
    • Date
    • Thread