goncalo_espinha's profile

12 Messages

 • 

200 Points

Thu, Nov 13, 2014 11:10 PM

Closed

Answered

Photoshop: Script - WaitForRedraw function doesn't work

Hi there,

I am trying to make a 'palette' show and stay visible and I am using a WaitForRedraw function, but it returns that it is not a function. This is what I have:

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)
}

app.WaitForRedraw();

What is the problem? Why is it not working?

Thanks

Adobe Administrator

 • 

36 Messages

 • 

1.1K Points

7 y ago

Change this line from

app.WaitForRedraw();

to

WaitForRedraw();