I have written a nice script to add a frame to my photographs. The script presents a dialog to the user, where he can select all of the parameters of the frame. When the "Draw Frame" button is clicked, the frame is drawn. The dialog remains visible, and there is a "Reset Frame" button the user can click if he doesn't like the result and wants to try again. I recorded an action to invoke this script and assigned a keyboard shortcut to the action.
When I run the script from the Files | Scripts menu item, it works fine. When I run the script through the action, the frame does not appear until I close the dialog window. That makes it harder for the user to redo the frame if necessary. How can I get the frame to appear before the dialog closes when running my script as an action?
There is no need to record the script into an action just to assign a shortcut key. Shortucts can be directly assigned to an installed script and are easier on the fingers than when recorded into an action.
Install the script in the application/program presets > scripts folder:
Thank you, but I saw no way to use Edit > Keyboard Shortcuts to create a shortcut to run a specific script file. If there is such a way, could you please explain it?
I created the action to run the script file because it is possible to assign a keyboard shortcut to an action. However, as I described in my post, when I run the script through the action, the resulting frame is not shown until I close the script's dialog box and the action completes. I need the frame to be displayed before the dialog box is closed so that the user will have a chance to adjust it.