Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

I have a script that works on all the machines in my office except one can someone help me?

$
0
0

Most of the machines in my studio are running cs5.5 or cs6 but one machine is running 5.1 - we have been using this script on all the machines:

 

#target photoshop

function main(){

if(documents.length != 1) return;

// Open psd with the layers to copy

var PSD = new File("/Applications/Adobe Photoshop CS6/Presets/Scripts/Script_Resources/moreLengthsOverlayTemplate.psd") ;

if(!PSD.exists) return;

open(PSD);

selectAllLayers();

activeDocument.activeLayer.duplicate(documents[0]);

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

}

function selectAllLayers() {

var desc29 = new ActionDescriptor();

var ref23 = new ActionReference();

ref23.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );

desc29.putReference( charIDToTypeID('null'), ref23 );

executeAction( stringIDToTypeID('selectAllLayers'), desc29, DialogModes.NO );

}

main();

 

but i have one troublesome machine that is giving me issues.

here are some screen shots to illustrate what is happening:

Screen Shot 2013-05-30 at 11.05.37 AM.png

Screen Shot 2013-05-30 at 11.07.23 AM.pngScreen Shot 2013-05-30 at 11.07.38 AM.png

I'm not terribly script saavy and I am not sure if this is just because the machine in question is running cs5.1 or if theres some other problem.

Thanks for your help!


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>