Is there any way to get a list of all the menu items under a menu heading like File or Edit with AppleScript?

I've found some related questions, but nothing exact. No luck on Google either.

I'm trying to get a list of which files are open in Photoshop's Window menu, and figure out which one has the check mark.

screenshot-with-shadow.png

I think I might be able to do the second part by using something like " In Applescript, how can I find out if a menu item is selected/focused? " and the Accessibility Inspector since it has AXMenuItemMarkChar

screenshot-with-shadow.png

Edit
Report