• 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
GUI script a popup button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI script a popup button


  • Subject: GUI script a popup button
  • From: Mitchell L Model <email@hidden>
  • Date: Thu, 11 Aug 2016 13:47:23 -0400

I have something that used to work but no longer does (possibly because I upgraded from 10.8 to 10.11 and behavior is a little different). I often want use AppleScript GUI scripting to click a certain item in a popup menu. The only way I have found to do this is to tell the button to click. Then, the way it used to work was that the button's menu would stay dropped down and its elements were available to AppleScript. (Before it dropped down the button's menu is not available.) I want to how to click an item of a menu button.

An example is that I haven't found anyway to directly script setting the "Open with" of a file. So I have a handler that for each item in the Finder's selection does:
	open the item's information window
	click the "Open with" menu button (button 1 of scroll area 1 of window 1, or menu button 1 of …)
	select by name the argument to the handler (the name of an application, including ".app")
	close the information window

Maybe there's another way to do this? In ASObjc perhaps?





 _______________________________________________
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


  • Follow-Ups:
    • Re: GUI script a popup button
      • From: Shane Stanley <email@hidden>
    • Re: GUI script a popup button
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Return of the bug: "tell me to activate"
  • Next by Date: Re: Return of the bug: "tell me to activate"
  • Previous by thread: Re: Return of the bug: "tell me to activate"
  • Next by thread: Re: GUI script a popup button
  • Index(es):
    • Date
    • Thread