Thank you. If I understand you correctly that would get me partly there. Was hoping for something cleaner, like access any image in the clipboard history and use an action to write it to a file.
The write-text macro is the cleaner of the two, since the clipboard history window is unchanged when the macro is run.
Unfortunately the only way to acquire an image for writing is to copy it to the system clipboard, and that act moves the position of the image in the history to the top – which also moves the selection in the window.
The hotkey trigger macro is a trifle slower than I like, because I have to resort to UI-Scripting with System Events – but it's not bad.
In any case it provides a smoother user experience than my first try.
Note – this method bypasses the [Close After Action] button setting of the Clipboard History Window. The window will always be left open, until the user elects to close it.