Question: How Can I Select a Named Object in Keynote with AppleScript?

Keynote provides the ability to name objects on a slide. I want to select one of those objects using AppleScript and then manipulate it further using Keyboard Maestro. Does anyone know how to do this? I’d be grateful for a code snippet. Thanks.

Model: MacBook Pro M1 Max
Browser: Safari 537.36
Operating System: macOS 12

I took a look, and as far as I can tell, there is no Applescript availability of this attribute.

Here is a example to list text items and from that you could select a object by index.
If you prefer a name you could have a function that get the index from a list.

The example return a list and select the text item 2

tell application "Keynote"
	tell document 1 to tell current slide to tell text items
		set theObjects to its object text
	end tell
	
	tell document 1 to tell current slide to tell text item 2
		set obj2 to its properties
	end tell
	
end tell

return {theObjects, obj2}