Wondering if this could be a bug in Photoshop. When scaling a layer and entering values of 100%, an error message pops up:
var srcDoc = app.activeDocument;
var numOfLayers = srcDoc.layers.length;
// main loop
for (var i = numOfLayers -1; i >= 0 ; i--)
{
var thisLayer = srcDoc.layers[i];
//select that layer as you go along
srcDoc.activeLayer = srcDoc.artLayers[i];
}
The error displayed is: Error 8007: user cancelled the operation
https://i.sstatic.net/07iy4.jpg
Interestingly, scale values of 100.000001 work fine.
On a more crucial note, even when displayDialogs is switched off:
displayDialogs = DialogModes.NO; // OFF
The user still needs to confirm the transform by pressing enter or the tick button. Is there any way to prevent this?