• 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
UI Scripting flaking out on simple tasks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UI Scripting flaking out on simple tasks


  • Subject: UI Scripting flaking out on simple tasks
  • From: Henrik Boes <email@hidden>
  • Date: Tue, 30 Dec 2003 17:10:51 -0700

I am trying (still) to get a handle on GUI scripting and am finding myself moving backwards, not forwards. Below is the simple script I'm testing:

tell application "TextEdit" to activate
tell application "System Events"
if UI elements enabled then
click menu item "New" of menu "File" of menu bar item "File" of menu bar 1 of application "TextEdit"
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
end tell
end if
end tell

The error I get:

TextEdit got an error: +class menI; "New" of +class menE; "File" of +class mbri; "File" of +class mbar; 1 doesn't understand the click message.

I can't imagine this is a syntax issue (what else would the command be if not "click") and it looks like the GUI Scripting components are working properly. Any ideas?

I'm running OS X 10.3.2

Thanks,

Henrik Boes
_______________________________________________
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.

  • Follow-Ups:
    • Re: UI Scripting flaking out on simple tasks
      • From: Bill Cheeseman <email@hidden>
    • Re: UI Scripting flaking out on simple tasks
      • From: Craig Sutherland <email@hidden>
  • Prev by Date: Re: getting the date
  • Next by Date: Re: UI Scripting flaking out on simple tasks
  • Previous by thread: Keystroke command
  • Next by thread: Re: UI Scripting flaking out on simple tasks
  • Index(es):
    • Date
    • Thread