est

Page 171

Adobe Photoshop CS4 JavaScript Scripting Reference

JavaScript Object Reference

} // Fill the current selection with the foreground color checkersDoc.selection.fill(app.foregroundColor) //Invert the selection checkersDoc.selection.invert() // Fill the new selection with the background color checkersDoc.selection.fill(app.backgroundColor) // Clear the selection to get rid of the non-printing borders checkersDoc.selection.deselect() // Reset the application preferences app.preferences.rulerUnits = startRulerUnits app.preferences.typeUnits = startTypeUnits app.displayDialogs = startDisplayDialogs // A helper function for debugging // 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) }

171


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.