This is weird, and I cant figure it out. I am trying to select different menu items of a pop up button. (in the app securityspy) This runs, but does nothing:
tell application "System Events"
tell process "SecuritySpy"
click pop up button 2 of window 1
click menu item "Living Room" of menu 1 of pop up button 2 of window 1
end tell
end tell
so, I did a full extra suits script, and it works fine:
tell application "System Events"
tell process "SecuritySpy"
set {X, y} to position of pop up button 2 of window 1
tell application "Extra Suites"
ES move mouse {X, y}
ES click mouse
ES move mouse {X + 30, y + 30}
delay 1
ES click mouse
end tell
delay 1
end tell
end tell
Although the previous functions, it is not specific. I want to be able to click on the specific menu item, so I did this:
tell application "System Events"
tell process "SecuritySpy"
click pop up button 2 of window 1
set {X, y} to position of menu item "Living Room" of menu 1 of pop up button 2 of window 1
tell application "Extra Suites"
ES move mouse {X, y}
ES click mouse
end tell
end tell
end tell
for some odd reason, this does not work. I do not understand why the normal click command looks like it does its job. It even will select the item “Living Room” and make it appear as the highlighted portion of the pop up button, but it does not change the settings. So, I tried the full extra suites thing, and it works. I figured I could then do a normal click to open the pop up button, and then do an extra suites click to select it, becuase that is usually the problem. But that did not work. So, here is my question. I need to state specifically which menu item to click of the pop up window. How can I do this and make it work, rather than just look like it is? Is it a focus issue? Thanks.