Goal: Use a script to open a PSD with 'read composite data' to open the image/s flattened.
Use case/why: Significantly speed up the process of batch exporting big and heavy images.
When opening a document while holding down Shift+Control, Photoshop asks "Read the composite data instead?", and opens the file flattened. Which is faster than opening the whole file with all the layers. This saves time when opening very big files, which is handy when the only reason for opening the files are to export them quickly.
I have used ScriptingListener and consulted with the scripting documentation, plus some google-fu, without luck.
(JS within Photoshop is of course preferred. The only other way I can think of (is a little outside of scope for this forum) is through an AppleScript outside of Photoshop to send the keystrokes to the OS, open the specified files in Photoshop and then steer Photoshop "from the outside", running actions etc. But I haven't found any example on the internet where pushing keys and opening can be combined, only as separate steps after each other.) !
I don't see the shift or control getting recorded or available for playback in some other fashion. You would write up a request here if you want. Feature Request/Bug Report Form