Frame script shows frame when running from File menu but not from action
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?
