2

I would like to click and have automatic action with a software, I can refer to it and get the value of the text but can't manage to click

tell application "System Events" to tell process "app"

    click static text "General Info" of UI element 1 of row 1 of table 1 of scroll area 1 of front window

end tell

This return missing value

and if I do select static text "General Info" of UI element 1 of row 1 of table 1 of scroll area 1 of front window then I have a return (but no click obviously)

what can I do to click in this area ?

I have a similar issue with a dropdown menu with I have to select and set a value

set value of pop up button 1 of group 3 of group 2 of scroll area 1 of group 3 of front window to "Open"

I can't manage to select a value (for example the second value inside the menu)

  • Can you please tell us which application you are trying to use the UI scripting with? To be able to give you an accurate solution, I for one would like to be able to test it on my side – wch1zpink Feb 11 '18 at 15:01
  • Unfortunately it's a internal business app – Kevin Feb 11 '18 at 15:03
  • I didn't know you can sent Automator actions to AppleScript that's great. thank you ! reply as an answer so I can valid the answer ! thank yo – Kevin Feb 11 '18 at 15:20
2

You can try using Automator “Watch Me Do” and record your actions in that business application. When you are done recording your actions, you can select all of those recorded actions and copy them to your clipboard. You can then paste into a script editor document. From there you will be able to see the commands and UI elements then just backward engineer them to suit your needs

For example in this following image, the commented code was what I pasted into script editor from the copied commands of “Watch me do” in Automator. The compiled code was my re-wording of it

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .