Copy link to clipboard
Copied
Hi, it's no doubt known but this bug bothers my workflow a lot, I use actions with javascript and just about always after opening an image I need to wait a few seconds before running an action or I get this error "Javascript code was missing" not sure if this is unique to my installation or not.
Copy link to clipboard
Copied
Please post the problem script and a screenshot of your actions panel fully expanded.
Copy link to clipboard
Copied
Thanks, i've attached my script, it resizes an image after loading.
In my action I prompt a load dialog and load an image and then run the script. many times it works but just as many times it fails with the attached message. It usually works on a repeat try, though on rare occasions doesn't work at all until a PS restart.
//script
// Call the source doc
var srcDoc = app.activeDocument;
// get original width and height
var w = srcDoc.width.value;
var h = srcDoc.height.value;
// adjust canvas size four times original
// with the anchor in the top left
srcDoc.resizeCanvas(w/3, h, AnchorPosition.TOPLEFT);
Copy link to clipboard
Copied
the actions panel. i've noticed it is time dependant, many times my scripts work if I wait a few seconds after opening an image
Copy link to clipboard
Copied
What happens if the action records the script being run from C:\ drive, rather than E:\ drive?
What happens if you install the action into the program folder for Photoshop > Presets > Scripts, then record the action from File > Scripts rather than browsing?
What happens if you create an action to resize? (it doesn't look like a script is really needed for the use case)