KM action to save menu item as variable?

Hi, is there a way to save the name of a particular menu item to KM without using AppleScript?
Currently I am using this script and prefer to do in KM or a faster language.
Many thanks.

Not with a native Keyboard Maestro action. Maybe using another language, presumably JXA could do it.

You could compile the script, but I doubt it’d go any faster - the accessibility API is very slow.

What app are you accessing?
The fastest way would be direct object scripting, if the app supports scripting.

Otherwise, with UI scripting, I doubt that anything, including JXA, would be faster. JXA would also have to go through the System Events app.

If what you are seeing is slow, it is probably due to the app dynamically generating the menu.

But this is all very much guess work until we know what app you're dealing with.

The name of the app is Daylite

Can you give us a link to its main web site?

Hiya, here is the main website:
here is the API page