Sub Menu as most recent

I started helping someone with a KM question on another forum, and I got stumped. He wanted to open an app to it’s last opened document. Sounds easy enough using KM. I got this far:

Open “/Applications/Curio.app”
Pause for 1.5 Seconds
Select “Open Recent” in the Menu “File” in Curio

But, this opens a submenu showing all the recent files within some size limit. The problem is, the submenu of Open Recent shows a list of all the recent files and none of them have a standard name. So I can’t see how using submenu would have any bearing on solving this problem?

Are the items in a menu numbered so I could say: “submenu: select item 1”? As this is just about opening the last file worked on it is only important to select the first item in that menu.

Other than just telling the cursor to move to a screen location of the submenu and click once it is exposed, I can’t think of another option. Anyone have thoughts on this?

I looked at other threads, here, and could not find the answer because in this discussion there was a named submenu and as I have said, this is not a named submenu but a list of recent and somewhat random files.

do you want to open a specific recent file, or the first file of the open recent submenu.
I am confused.

Sorry, the first file of the open recent submenu.

My apologies. I had a few ideas, tested them and nothing works.
I am probably the least intelligent member of this forum, so wait for other opinions.

This AppleScript opens the x Recent Menu Item. I hope it helps.

Keyboard Maestro 8.1.1 “Open Curio recent item” Macro

Open Curio recent item.kmmacros (2.4 KB)

This should work:

Show Menu File ➤ Open Recent ➤
Pause
Type a Keystroke: Return

Thanks guys. I just posted a link to this thread on the OP users thread on the Curio forum.