AppleScript doesn't seem to click where I want it to

I'm trying to have an AS click a certain text area in a standalone app (Loopcloud), but it's not working. Here's the script:

tell application "System Events"
	tell process "Loopcloud" to click text area 1 of window 1
end tell

Here's what UI Browser shows and where I want to click:

Am I missing something or maybe this just doesn't work at all?
I also tried just

tell application "Loopcloud" to click text area 1 of window 1

but that doesn't work either (but maybe that one is not even the right approach anyway)

I would click in the text area while in screen reader mode, and then press ⌥⌘S and go to the AppleScript menu and copy the copy to "click selected element" if that's available. You can also copy the "tell block wrapper" to get the code to wrap the element code in. Super handy.

Sometimes, the "click selected element" is not available, and you can get the code to reference the element instead and experiment with that.

On the other hand, I have a Mail.app script that clicks the HTML area of a message, and it no longer works in Sonoma even though UI Browser shows nothing has changed. So that's always a possibility. Let us know if it works!

I did that, but nothing seems to change. Was it supposed to?

Can you clarify what/where this is?

This is way too complex for me...

Not sure if my post was clear enough, but that second image shows the information I need to use, because that's the one when I either hover over the text area or click on it, as you suggested.

I used UI Browser a few times before and it always showed me the info related to the elements I needed to click, but for some reason now it's not working for this particular text area.

Last resort I can always use a Found Image or click based on the left top corner of the app's window. I'm just curious to know if the issue is my script or maybe Loopcloud is the issue here?

If you click or hover over the desired field while in Screen Reader mode and use that shortcut ⌥⌘S, you should then be able to select the AppleScript menu of UI Browser:

Screenshot 2024-03-07 at 5.46.42 PM

From there, the Tell Block Wrapper will give you code like this:

-- Use this script as a wrapper for GUI Scripting statements when you are confident that GUI Scripting is available and enabled or that the user knows how to enable it if necessary

activate application "Safari"
tell application "System Events"
tell process "Safari"
-- insert GUI Scripting statements here:

end tell
end tell

Then you can get other code snippets to copy/paste in the "insert GUI Scripting statements here:" section.

This does not always work as expected, depending on the app and the elements, but that's the easiest way to get the exact code you need. The biggest gotcha is when the elements get "destroyed" but it should give you a notification in that case. The other gotcha appears to be Sonoma, which is just more finicky that previous macOS versions.

Maybe I'm missing something, but that doesn't work for me. The options in the AppleScript menu are grayed out...

Kapture 2024-03-08 at 09.05.56

It's hard to follow exactly, but the app you are trying to read should be in front when you trigger the shortcut. After you trigger it, UI Browser should automatically come to the front. I don't see Loopcloud in the menu bar (I see the screen capture app) and then I see you app-switch to UI Broswer. Not sure what's happening there.