GUI scripting: "pick menu" vs. "click menu"?

In GUI scripting, is there ever any difference between “pick menu” vs. “click menu”?

Hello

As far as I know there is a huge difference.
Click menu is defined in System Events dictionary but pick menu is not.

Yvan KOENIG (VALLAURIS, France) dimanche 18 mai 2014 09:10:39

Yeah, I can see that pick isn’t in my System Events dictionary.
I did a Google search here ” site:macscripter.net “click menu” “pick menu” ” and see the two being used seemingly interchangeably, but no explanation as to what circumstances dictate one or the other, aside from this post here:
http://macscripter.net/viewtopic.php?pid=121566#p121566
…which says that pick is “the way to choose a drop-down menu item.” I got either to work in one of my GUI scripts within a tell application “System Events” statement, but I find no tutorials or anything here about which is appropriate. I would like to know more.

For example, I found this elsewhere from a Google search, and he’s using both pick menu item and click menu item in the same script, but I can’t discern from context what the difference is:


tell application "Tree"
	activate
	tell application "System Events"
		tell process "Tree"
			pick menu item "Export..." of menu 1 of menu bar item "File" of menu bar 1
			tell sheet 1 of window 1
				click pop up button 1 of group 1 of group 1
				click menu item "OPML1.0" of menu 1 of pop up button 1 of group 1 of group 1
				click button "Save"
				if exists button "Replace" of sheet 1 then
					click button "Replace" of sheet 1
				end if
			end tell
		end tell
	end tell
end tell

As I am unable to find the pick feature described somewhere, I will just hope that StefanK will see this thread and will give details.

At this time I opened System Events.sdef with XCode and found :

<class name="UI element" code="uiel" description="A piece of the user interface of a process" inherits="item" plural="UI elements">
			<cocoa class="UIElement" />
			<responds-to command="click">
				<cocoa method="click:" />
			</responds-to>
			<responds-to command="select">
				<cocoa method="select:" />
			</responds-to>
			<responds-to command="increment">
				<cocoa method="increment:" />
			</responds-to>
			<responds-to command="decrement">
				<cocoa method="decrement:" />
			</responds-to>
			<responds-to command="confirm">
				<cocoa method="confirm:" />
			</responds-to>
			<responds-to command="pick">
				<cocoa method="pick:" />
			</responds-to>
			<responds-to command="cancel">
				<cocoa method="cancel:" />
			</responds-to>

Time to search what is the cocoa method pick.

Yvan KOENIG (VALLAURIS, France) dimanche 18 mai 2014 18:47:22