GUI script a popup button
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