My solution would also be with the tabs @PianoAl. But it goes so fast that it doesn't attract much attention.
I would also be interested to know if there is another possibility with a script.
Yes, fortunately there is. Though it may not seem like it, this dropdown menu can be pressed using KM's Press a Button action. An example macro would look like this:
On my system, this macro ran fine without the need for pauses, but if you find you run into issues on your system, I would suggest adding slight pauses between actions as per @appleianer's example.
Based on your screenshot, it looks like you tried the macro while the KM editor is the frontmost app, and thus, while the Photoshop dialog wasn't available. Try running the macro while making sure Photoshop is the frontmost app and see if that doesn't change things.
Damn, I guess I didn't test this thoroughly enough. While this method does work with menu buttons marked with a single arrow, like "PDF" in the print dialog:
You're right in that it doesn't work with pop up buttons marked with double arrows, like the dialog in question or similar ones in Safari and TextEdit:
My apologies to you and everyone else in the thread for inadvertently offering a misleading non-solution.
Yes, Photoshop Elements. I can save JPG files with the File/Save for Web ..., but that replaces spaces in the filename with hyphens. I was looking for a way to make it easier to save an image as a JPG.