How are you?
I’ve created an applescript automation to save files in .JPG while the Save Dialog Box is open. (So I can control the name of the saved files)
Is there a way to control the Save Dialog Box of Photoshop?
What I want to happen is: Upon appearing of save dialog box
-Command + a will happen (to select all characters)
-Press delete (to delete all characters selected)
-Delay 8 seconds = Enough time for me write my own file name.
-Automation will press return to save the file under my own written file name.
I tried reading Photoshop’s dictionary at Script editor but found no results for Controlling Photoshop’s save dialog box.
I tried doing system events to do command a + press delete + delay 8
seconds and pressing return but that event only happens after the save
dialog box disappears instead of doing that on the actual save dialog
box.
My Photoshop is: CS6 Extended
Os: El Capitan
Thank you very much.
2
Answers
You should avoid using GUI scripting : each time Adobe (or Apple) will change the graphic display of the ‘save as’ dialog box, your script may no longer work.
Instead, use a 2 step approach : 1) get the false name and path using a standard ‘choose file name’ and then use this file to save using ‘save’ command in Photoshop. This script assume there is a current open document.
Please update ‘Adobe Photoshop CS3’ with your version (mine is a bit old, but good enough to test !).
Also, the default folder could be adjusted for your needs (here = Desktop).
Note 1: you can improve that script by checking the extension typed in file2save variable, and, if missing, the script can add the correct extension (i.e. ‘jpg’).
Note 2: Adobe made some changes in ‘open ‘ command between version CS3 and CS6. I hope these changes do not affect the ‘save’ command.
This is a code to what you specified also it includes open the save box: