• 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: UI Scripting menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI Scripting menu items


  • Subject: Re: UI Scripting menu items
  • From: Ken Liu <email@hidden>
  • Date: Thu, 10 Apr 2003 12:07:55 -0400

On Thursday, April 10, 2003, at 09:17 AM, John Delacour wrote:

At 8:51 am -0400 10/4/03, Bill Cheeseman wrote:

The best way to try to control this is to include a command in your script
that opens the menu holding the menu item of interest, in order to let the
target application determine the proper current contents of the menu. It
doesn't always work, but I believe it sometimes does.

In that case this ought to do the trick:


tell application "System Events" to tell process "Eudora"
set frontmost to true
tell menu bar 0 to click menu "input"
keystroke return
end tell


Thank you, John and Bill, with your help I got the script to work! (very cool) I also found that if you pop up dialog boxes in the script, you have to set Finder to be frontmost again right afterwards in order to get the menu clicks through (that's the "queuing" behavior I was seeing before).
_______________________________________________
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: 
 >Re: UI Scripting menu items (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Bug in iTunes AppleScript Implementation? (bounds of window)
  • Next by Date: Eudora Settings (was Re: (no subject))
  • Previous by thread: Re: UI Scripting menu items
  • Next by thread: UI Scripting menu items
  • Index(es):
    • Date
    • Thread