I have a problem with a photoshop script in the switch photoshop configurator.
I've included a script in the save method to save the image in the same file format as it comes in.
There is no other script or action selected.
When the script is executed the log says "Job processing successfully completed!" but the image will not go forward into the next folder.
Can somebody please help me with that?
Many Thanks!
Two problems: you are not telling Photoshop to save the file to $outfile and $outfile is just a string, but the Photoshop documentation says to use a File object. The correct code (well, I have not tested it) should be like this:
try {
var $outfile = new File($outfolder + '/' + $filename + "." + $extension);
$doc.save($outfile); //perhaps you need SaveOptions as a 2nd parameter, but it is optional
$outfiles.push($outfile);
}
catch(theError) {
$doc.close(SaveOptions.DONOTSAVECHANGES);
$error = theError.description;
}
If your script is attached to a "save" action, it should set the contents of this array variable to the absolute paths of the output files generated by the script
The save() function doesn't need any parameters, it just saves the current document.