Skip to content

Instantly share code, notes, and snippets.

@Arahnoid
Last active April 21, 2019 23:21
Show Gist options
  • Save Arahnoid/19ff42e0f1693c6b2e98 to your computer and use it in GitHub Desktop.
Save Arahnoid/19ff42e0f1693c6b2e98 to your computer and use it in GitHub Desktop.
[Debug Photoshop Fn] #Photoshop
// A helper function for debugging in Photoshop
// It also helps the user see what is going on
// if you turn it off for this example you
// get a flashing cursor for a number time
function WaitForRedraw() {
var eventWait = charIDToTypeID("Wait")
var enumRedrawComplete = charIDToTypeID("RdCm")
var typeState = charIDToTypeID("Stte")
var keyState = charIDToTypeID("Stte")
var desc = new ActionDescriptor()
desc.putEnumerated(keyState, typeState, enumRedrawComplete)
executeAction(eventWait, desc, DialogModes.NO)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment