/////////////////////////////////////////////////////////////////////////////// // Function: WaitForRedraw // Usage: Use it to force Photoshop to redraw the screen before continuing // Input: // Return: // Example: WaitForRedraw(); // Note: For Photoshop CS3 you can use app.refresh() to replace this function /////////////////////////////////////////////////////////////////////////////// function WaitForRedraw() { var keyID = charIDToTypeID( "Stte" ); var desc = new ActionDescriptor(); desc.putEnumerated( keyID, keyID, charIDToTypeID( "RdCm" ) ); executeAction( charIDToTypeID( "Wait" ), desc, DialogModes.NO ); }