Automate screenshot of a specific window
I'm trying to create a workflow in Mac Shortcuts.app (or Automator if preferable) to take a Screenshot of a specific window.
I'm confused by Shortcuts.app, which seems to offer various possibilities, but I can't get any of them to work, except Full Screen and/or Interactive (same as Cmd-Shift-4 ... spacebar)
The alternative of using; Select Magic Variable, doesn't appear to accept any input. I have used Find Windows to select the window I want, which correctly shows the window in the Shortcut.app's window, when I run the Shortcut, but it isn't passed as a Magic Variable despite it being accepted as one. No matter what I try, it always takes a screenshot of the Full Screen.
I'm wondering if these are simply buggy 'shortcuts' originally developed for iOS and poorly implemented into Monterey??
Either way... can anyone suggest how I could automate taking a screenshot of a specific window?
This is the simplest vs of what I'm getting. The window I want is the small one top-left. Full-Screen is what is returned.
MacBook Pro Retina