2

I'm trying to click on a button using YX coordinate, it's work with some app, but I have one app with two windows which give me an issue.

here is my original code

tell application "System Events"

    tell process "App"
        click at {783, 621}

    end tell
end tell

but the result is Result:

image 1 of UI element "Email" of row 2 of table 1 of scroll area 1 of window "App title" of application process "SonarX" of application "System Events"

the button I want to click have indeed an image (UI) but click seems to happen.

PS the App title contain some variable but have some static too

I tried this instead

tell application "System Events"


    click at {783, 621}

end tell

but same issue.

How can I manage to have this button pressed ?

if I try using automator I have the same result

"set uiScript to "click image 1 of UI Element 1 of row 2 of table 1 of scroll area 1 of window \"Title 558772: XXXXX :XXXXX : XXXXX : 5583214\" of application process \"App\"""

FYI, I have other button that I manage to click normaly on the same windows e.g

set uiScript to "click pop up button 1 of group 3 of group 2 of scroll area 1 of group 3 of window 1 of application process \"App\""

-- I also tried but without success

tell application "System Events"
    tell process "App"
        click image 1 of UI element "Email" of row 2 of table 1 of scroll area 1 of window 1

    end tell
end tell
Kevin
  • 2,178
  • 2
  • 29
  • 59
  • 2
    When I run into an issue where regular AppleScript will not perform a click event, I use a third-party utility named [**cliclick**](https://www.bluem.net/en/projects/cliclick/). Note that I am not affiliated in any way with the developer of this utility and just use it as necessary for my my own personal needs. Here is an [Ask Different answer](https://apple.stackexchange.com/questions/276357/applescript-how-to-double-click-right-click-at-cursor-location/276390?s=1|18.2503#276390) of mine that shows a way of using it. – user3439894 Apr 29 '18 at 12:30

0 Answers0