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

Action & Droplet "save as" vs "save as web" not working - Possible bug?

$
0
0

Before I state the issue, I am running the latest updates and have tried this in Photoshop CS4 & CS5.

I believe this is a bug in Photoshop, unless someone can get this Action & droplet to work right.

 

Here's the issue:

I create an Action with the "Save as Web & Devices" and save the image as a PNG. Then create a Droplet and set the destination as "Folder" with a destination different from the source file, and check Override Action "Save As" Commands and use File Naming with Document Name + _H50 + extension (example: MyFile_H50.gif). The file naming convention I made doesn't carry over to the processed images.

 

However this droplet will work with the Action when I use the "Save As" command, but not the "save as web & devices" option. Has anyone came across this issue or know how to fix it?

The difference between "save as" and "Save as web" is a 3kb files size plus the "_H50" naming convention is not used.

 

Here's a detailed process of my action and creation of the droplet:

CREATION OF ACTION:

1.) I have a .TGA file open with alpha channel layer.

2.) I set the selection to the alpha channel, go back to the layers panel, double click layer, Set backgound to Layer 0, Inverse the selection, delete the background, trim image to transparent pixels, change image size to a fixed height of 50 pixels.

 

Here's the variable step that works or doesn't work depending if I choose "Save as" or "Save as Web & Devices"

3.) File > "Save as Web & Devices", save image as PNG w/ alpha, and select my "processed images" folder & save, close original  image without saving.

 

CREATION OF DROPLET:

1.) Save droplet location, Play action with include subfolders, Suppress file open options dialog, Suppress Color profile warnings.

2.) Destination: Select a folder

3.) Use File Naming: Document Name + _H50 + extension

4.) Save log errors.

 

Next I drag some images onto the droplet, it processes the images into the folder but doesn't use the File Naming convention.

Now, if I use the "save as" command in the action and create the droplet the same way, it works!

The difference between "save as" and "Save as web" is a 3kb files size plus the "_H50" naming convention is not used.

 

What the heck is going on? Please Help

-Josh


Photoshop missing in Object Model Viewer (ExtendScript ToolKit CC) after installing 2015 CC

$
0
0

After installing Adobe Photoshop CC 2015 (32 Bit) on Windows 7, the entries for Photoshop in the Object Model Viewer (OMV) were missing.

I checked couple of properties before updating to CC 2015 – so I'm 100% sure that Photoshop was in the list just before the update.

 

How do I get the Photoshop Object Model entries back in the list (I have a 2-3 versions, but they all disappeared from the list, when installing CC2015)?

 

missing photoshop.PNG

 

Thanks,

Andreas

Creating .ACB (Color Book) file from .ACO (swatches) file

$
0
0
Is there a way to convert a .aco file to a .acb file? I really need my colors to be visible in the Color Libraries section of Photoshop to use with Color Layers.

The .acb files are the files located in \Program Files\Adobe\Adobe Photoshop CS2\Presets\Color Books.

Please let me know if anyone knows how to do that, it would be really helpful!

A question about photoshop javascript

$
0
0

Excuse me,is there have any javascript properties (or method) that can execute 'replace contents...' command of smart object ?

thanks,my Email: 59634270@qq.com

How do I include a value for Anchor / psAnchorPosition in the Rotate parameter list?

$
0
0

Hi,

 

I'm a beginner to scripting, using Visual Basic.

I'm trying to use the Rotate() method to rotate an artLayer in Photoshop CS6.

.Rotate(14.5) etc seems absolutely fine.

 

BUT I want to be able to specify the center around which the rotation occurs, which is, I understand, governed by psAnchorPoint.

The syntax for Rotate() is given in the VB Scripting Reference Manual as:

 

Rotate(Angle  [, Anchor])

 

My question is, how do I include a value for  Anchor / psAnchorPosition   in the Rotate parameter list? I've tried a lot of variations but none seems to be acceptable. Any thoughts anyone?

Processing a folder of images with Applescript

$
0
0

Hi everyone

I am having a problem with my Applescript that I want to open a folder of images and process in PS.

The script works fine on a single test image whose file path I hard coded to open, but after adding the looping section, I'm not sure I have the right set up to open each image.

That part of my script is:

 

setsourceFolderto "Users:etc:etc" asalias

setdestFolderto "/Users/etc:etc"

--source and destination folders for the images

 

tellapplication "Finder" tosetimageSettoeveryfileinsourceFolder

 

tellapplication "Adobe Photoshop CS6"

  activate

  setruler unitsofsettingstopixel units

  repeatwithifrom 1 to (countofimageSet)

  setcurrentImgtoitemiofimageSet

  opencurrentImg

  ....

  (rest of the code to adjust the images)

  ....

  end repeat

end tell

 

The error i get is "Finder got an error: document file "(filename)" of folder "(folder name)" (the rest of the file path) of startup disk doesn’t understand the “open” message." when it halts at the 'open currentImg' command

 

Just wondering if anyone could help me with this? Or offer some code that might work?

Would be appreciated, as this is the last thing I need to do to finish the script and get the job completed.

 

Thx in advance

 

Marty

How to understand some functions of some scripts?

$
0
0

How to understand scripts written this way, this is some build? how to unravel it?

Example:

 

@JSXBIN@ES@2.0@MyBbyBnAEM2hRBbyBn0ABa2hSBb2hTBn0AEJ2hTBnAEjzRjNjBjLjFiBjDjUjJjWj

FiCjZiJjOjEjFjYBfRCARBQzACfVzOjTjFjMjFjDjUjFjEiMjBjZjFjSjTDfBVzBjJEfAfFcfffJ2hV

BnAEXzGjSjFjTjJjajFFfXzLjBjDjUjJjWjFiMjBjZjFjSGfXzOjBjDjUjJjWjFiEjPjDjVjNjFjOjU

HfjzDjBjQjQIfRDVzKjIjPjSjJjajPjOjUjBjMJfCVzIjWjFjSjUjJjDjBjMKfDVzOjBjOjDjIjPjSi

QjPjTjJjUjJjPjOLfGffJ2hWBnAEXzGjSjPjUjBjUjFMfXGfXHfjIfRCVzFjBjOjHjMjFNfEVLfGffO

2hYBby2hZBn0ABJ2hZBnAEjzLjTjDjBjMjFiTjUjZjMjFjTOfRBEXzDjNjBjYPfjzEiNjBjUjIQfRCX

zFjWjBjMjVjFRfjzNjIjPjSjJjajPjOjUjBjMifjTjMSfXRfjzLjWjFjSjUjJjDjBjMifjTjMTfffff

AVzHjTjDjBjMjFiGiYUfFnAVEf0AXzGjMjFjOjHjUjIVfVDfBByBzBhcWAHE40BiAN4D0AhAU4E0AhA

L4F0AhAD40BhAJ4B0AhAK4C0AhAGBAzNjUjSjBjOjTjGjPjSjNiFjBjDjIXA2hcBM2heBbyBn0ABg2i

ABbyBn0AGJ2iCBnASzTjJjEjTjDjBjMjFiFjGjGjFjDjUjTiFjWjFjOjUYAEjzQjTjUjSjJjOjHiJiE

iUjPiUjZjQjFiJiEZfRBFeRjTjDjBjMjFiFjGjGjFjDjUjTiFjWjFjOjUffnftJ2iDBnASzHjEjFjTj

DhRhShRgaBEjzQiBjDjUjJjPjOiEjFjTjDjSjJjQjUjPjSgbfntnftJ2iEBnASzFjJjEiTjDjM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fXMfViDfyBnftJiRnASzMjMjPjDjLiTjDjBjMjFifjDjCiTyBX

zJjMjPjDjLiTjDjBjMjFiUfXzKjDjIjFjDjLjCjPjYjFjTiVfXzHjPjQjUjJjPjOjTiWfViDfyBnftJ

iSnASzOjTjDjBjMjFiTjUjZjMjFjTifjDjCiXyBXOfXiVfXiWfViDfyBnftJiUnASzJjBjCjPjVjUif

jCjUjOiYyBXiYfXzHjCjVjUjUjPjOjTiZfViDfyBnftJiVnASzLjQjSjFjWjJjFjXifjCjUjOiayBXi

afXiZfViDfyBnftABnhEnbyBn0ABJibnAEjzFjBjMjFjSjUibfRBjhEfffJienABXzHjPjOiDjMjJjD

jLicfViTfyBNyBnAMiebyBn0ABOifbjAn0ACJjAnABXRfjTfXRfjSfnfJjBnABXzEjUjFjYjUidfjiQ

fXidfjiOfnfACWXRfjTfXRfjSfnnbjDn0ACJjDnABXRfjSfXRfjTfnfJjEnABXidfjiOfXidfjiQfnf

0DCCjGnfJjKnABXzKjPjOiDjIjBjOjHjJjOjHiefVSfyBNyBnAMjKbyBn0ADJjLnABXRfezEjUjIjJj

TiffEXzFjSjPjVjOjEjAfjQfRBXRfeiffffnfJjMnABXidfjiOfChSXRfeiffnneBhFnfOjObjPn0AC

JjPnABXRfjTfXRfjSfnfJjQnABXidfjiQfXidfjiOfnfAXRfjiTfn0DCCjSnfJjUnABXzIjPjOiDjIj

BjOjHjFjBfViOfyBNyBnAMjUbyBn0AHJjVnABXidfeiffEjzIjQjBjSjTjFiJjOjUjCfRBXidfeifff

fnfOjXbyjYn0ABJjYnABXidfeiffXRfjSfnfAEjzFjJjTiOjBiOjDfRBXidfeiffffnOjbnACheXidf

eiffXzIjNjBjYjWjBjMjVjFjEfjSfnnnOjfbykAn0ABJkAnABXidfeiffXzIjNjJjOjWjBjMjVjFjFf

jSfnfACWXidfeiffXjFfjSfnnnJkDnABXRfjSfXidfeiffnfJkEnABXidfeiffChSnnneBhFntOkGbk

Hn0ACJkHnABXRfjTfXRfjSfnfJkInABXidfjiQfXidfjiOfnfAXRfjiTfn0DCCkKnfJkOnABXiefVTf

yBNyBnAMkObyBn0ADJkPnABXRfeiffEXjAfjQfRBXRfeiffffnfJkQnABXidfjiQfChSXRfeiffnneB

hFnfOkSbkTn0ACJkTnABXRfjSfXRfjTfnfJkUnABXidfjiOfXidfjiQfnfAXRfjiTfn0DCCkWnfJkYn

ABXjBfViQfyBNyBnAMkYbyBn0AHJkZnABXidfeiffEjjCfRBXidfeiffffnfOkbbykcn0ABJkcnABXi

dfeiffXRfjTfnfAEjjDfRBXidfeiffffnOkfnACheXidfeiffXjEfjTfnnnOlDbylEn0ABJlEnABXid

feiffXjFfjTfnfACWXidfeiffXjFfjTfnnnJlHnABXRfjTfXidfeiffnfJlInABXidfeiffChSnnneB

hFntOlKblLn0ACJlLnABXRfjSfXRfjTfnfJlMnABXidfjiOfXidfjiQfnfAXRfjiTfn0DCClOnfJlSn

ABXiefViRfyBNyBnAMlSbyBn0ACJlTnABXRfeiffEXjAfjQfRBXRfeiffffnfJlUnABXidfjiSfChSX

RfeiffnneB2maCnf0DCClVnfJlXnABXjBfViSfyBNyBnAMlXbyBn0AGJlYnABXidfeiffEjjCfRBXid

feiffffnfOlabylbn0ABJlbnABXidfeiffXRfjiRfnfAEjjDfRBXidfeiffffnOlebylfn0ABJlfnAB

XidfeiffXjEfjiRfnfACheXidfeiffXjEfjiRfnnnOmCbymDn0ABJmDnABXidfeiffXjFfjiRfnfACW

XidfeiffXjFfjiRfnnnJmGnABXRfjiRfXidfeiffnfJmHnABXidfeiffChSnnneB2maCnt0DCCmInfJ

mNnABXicfViYfyBNyBnAMmNbyBn0ABJmQnAEjibfRBFeiOiUjSjBjOjTjGjPjSjNhAiFjBjDjIhAhSh

OhRKiDjSjFjBjUjFjEhAjCjZhAiLjBjNjJjMhAiLjIjBjEjFjZjFjWhAhIiAjEjBjSjLjXjBjSjLhJK

jCjMjPjHhOjLjBjNhYhYhOjDjPjNKlJhAhShQhRhVff0DCC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save the file with the same name

$
0
0

How to change the script to save the file with the same name ?






//SaveforWebSP.jsx 



//Save a fixed width image with a size constraint in its original folder 







var docRef = activeDocument; 



var outputFolder = docRef.path; 







NamesaveRef = new File( outputFolder + "/reference.jpg" ); 



var NewfileRef = new File( NamesaveRef ) 







// quality/size constraints 



var w = 1920; // new file width 



var MaxSz =  361440; // max. 360Kb 



var Qlt = 100; // initial quality 100 



var x = 1; // decreasing step 







// resize the image to the right width 



docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER); 







// Perform the first SaveForWeb Operation 



ExpWeb(NewfileRef, Qlt); 







// Keep trying to save the file with max. Qlt, but under MaxSz




while (NewfileRef.length > MaxSz) 



{      
Qlt = Qlt - x;      
NewfileRef = new File( NewfileRef );     
NewfileRef.remove();      
ExpWeb(NewfileRef, Qlt);  // Perform a new SaveForWeb Operation, with slightly lower Qlt         
if (Qlt <= 40) {           
alert("The file can't be saved with the desired size AND quality.");           
break  // break the loop whenever the quality is as low as 50 (this shouldn't need to happen)         
} 



} 







var FileSz = NewfileRef.length/1024; 



FileSz = Math.round(FileSz); 







// close the original file without saving 



activeDocument.close(SaveOptions.DONOTSAVECHANGES); 







// SaveForWeb Export, with the desired constraints and parameters 



function ExpWeb(FileNm, Qlt) 



{      
var options = new ExportOptionsSaveForWeb();      
options.quality = Qlt;   // Start with highest quality (biggest file).      
options.format = SaveDocumentType.JPEG;   // Save Format for the file      
docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options); 



}





How to move one layer above another layer uisng jsx ?

$
0
0

Hello guys,

 

can some tell me how to move one layer above another layer using jsx script ?

Script running slow

$
0
0

Hi guys,

 

I made a script to process pictures (the script is below). I want to run this script on multiple computers. The problem is that the script runs great on a couple computers but on other, it's very very slow. The computers have similar specifications like memory, CPU etc. So that doesn't seem to be the problem.


Do you guys have any idea what the problem can be and/or have experienced something like this before?


Thanks!

 

var maintainAspectRatio = true; //DEZE WAARDE STAAT OP TRUE ZODAT DE ASPECT RATIO WORDT AANGEHOUDEN
if(app.documents.length>0){    app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')');    app.activeDocument.guides.removeAll();
}
function FitLayerToCanvas( keepAspect ){    var doc = app.activeDocument;    var layer = doc.activeLayer;      //DE AFBEELDING WORDT HIER NAAR 1772 X 1772 PIXELS GEZET    doc.resizeImage(1772,1772);      if(layer.isBackgroundLayer || layer.allLocked || layer.pixelsLocked                            || layer.positionLocked || layer.transparentPixelsLocked ) return;    if( layer.kind != LayerKind.NORMAL && layer.kind != LayerKind.SMARTOBJECT) return;    var defaultRulerUnits = app.preferences.rulerUnits;    app.preferences.rulerUnits = Units.PIXELS;        var width = doc.width.as('px') -120;    var height =doc.height.as('px') -120;    var bounds = app.activeDocument.activeLayer.bounds;    var layerWidth = bounds[2].as('px')-bounds[0].as('px');    var layerHeight = bounds[3].as('px')-bounds[1].as('px');            //HIER WORDEN DE 60 PIXELS VANAF DE KANT AANGEHOUDEN    layer.translate(new UnitValue(60-layer.bounds[0].as('px'),'px'), new UnitValue(60-layer.bounds[1].as('px'),'px'));    if( !keepAspect ){        //DE LAAT WORDT HIER GESCHAALD TEN OPZICHTE VAN DE CANVAS        layer.resize( (width/layerWidth)*100,(height/layerHeight)*100,AnchorPosition.TOPLEFT);    }else{        var layerRatio = layerWidth / layerHeight;        var newWidth = width;        var newHeight = ((1.0 * width) / layerRatio);        if (newHeight >= height) {            newWidth = layerRatio * height;            newHeight = height;        }        var resizePercent = newWidth/layerWidth*100;        app.activeDocument.activeLayer.resize(resizePercent,resizePercent,AnchorPosition.TOPLEFT);    }      //DE LAAG WORDT HIER GECENTREERD    var width = doc.width.as('px');    var height =doc.height.as('px');    var bounds = app.activeDocument.activeLayer.bounds;    var layerWidth = bounds[2].as('px')-bounds[0].as('px');    var layerHeight = bounds[3].as('px')-bounds[1].as('px');      var dX = (width - layerWidth) / 2 - Number(bounds[0]);    var dY = (height - layerHeight) / 2 - Number(bounds[1]);    //DE ACTIEVE LAAG WORDT GECENTREERD    layer.translate(dX, dY);      //DE LAAG WORDT HERNOEMD    layer.name = "Layer 1"    app.preferences.rulerUnits = defaultRulerUnits;
}    //HET PAD WORDT HIER GEMAAKT    if(documents.length) main();    function main(){    var doc = activeDocument;    selectLayerData();    doc.selection.makeWorkPath(0.1);    doc.pathItems[0].name="Path 1";    doc.pathItems[0].makeClippingPath(0.5);    doc.pathItems[0].deselect()     doc.selection.deselect();    }    function selectLayerData() {    var desc2 = new ActionDescriptor();    var ref1 = new ActionReference();    ref1.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );    desc2.putReference( charIDToTypeID('null'), ref1 );    var ref2 = new ActionReference();    ref2.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Trsp') );    desc2.putReference( charIDToTypeID('T   '), ref2 );    executeAction( charIDToTypeID('setd'), desc2, DialogModes.NO );    };    activeDocument.changeMode(ChangeMode.RGB);      var doc = app.activeDocument;    var naam = doc.name;    saveFile = new File('/Volumes/Home Improvement Data-1/Pictures/Vrijgezet/JPG/' +naam)    saveFile1 = new File('/Volumes/Home Improvement Data-1/Pictures/Vrijgezet/PSD/' +naam)    saveOptions = new JPEGSaveOptions();    saveOptions.embedColorProfile = true;    saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;    saveOptions.matte = MatteType.NONE;    saveOptions.quality = 12;    psdOptions = new PhotoshopSaveOptions()    psdOptions.alphaChannels = true;    psdOptions.annotations = false;    psdOptions.embedColorProfile = false;    psdOptions.layers = true;    psdOptions.spotColors = false;    app.activeDocument.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);    app.activeDocument.saveAs(saveFile1, psdOptions, true,Extension.LOWERCASE);      app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

Camera raw preset using script or action

$
0
0

I have Camera Raw files as smart objects in Photoshop and I want to run an action or script to desaturate the image.

Actions can't record Smart object ACR files so I was hoping there's a way using a script and a ACR preset.

 

I don't know how to write scripts but I'm willing to give it a go if someone can tell me if it's possible or better still at least get me started.

 

Thanks guys.

Export layers to file script error in Photoshop CC

$
0
0

I need help with an issue.  I also asked this in the general forum but was refered here to ask all of you amazingly talented scripting geniuses.

 

My issue is with the Export Layers script that comes installed with Photoshop.  I am running Windows 7 64bit - using photoshop version: creative cloud 64bit.

 

When i try to run File>Scripts> Export Layers to files I get this error

Error 22: Windows does not have a constructor. Line: 239 -> dlgMain = new Window ("dialog", strTitle); 

When i load Photoshop Creative Cloud 32 bit i get a different error message when trying to run the script. 

Error - 33: Internal error . line:395 ->  dligMain.pnlFileType.pnlOptions.grpJPGOptions = ...

 

I can't run the image processor script I also get an error with that. 

 

This  is an issue for me as i use this script on a daily basis.  It worked in PSCS6  

I upgraded, i dont' want to have to load an older  version of photoshop to do this task  

 

Thanks

Carrie 

Can a single JS script perform actions on both Ai and Ps files?

$
0
0

I am rather new with the Adobe Extended Script thing, but i have a good understanding of scripting and JS language.
The task i need to perform should look like this:

-export a .jpeg file from Ai
-open a pre-existing Ps file
-import the exported .jpeg
-perform actions and save

 

Can a single script do all the work?
If so, is it enough to just start photoshop, maybe #targeting it?

 

Thankyou for the kind support, this will help a lot in simplifying things in my studio.

How to batch process .png's

$
0
0

I tried Image Processing but it wont save .png's. Anyone know how to do this?

"Auto white balance" script?

$
0
0

I"m a real esate photographer. I have a photoshop script that combines an ambient image and a flash image, however given the different colors of walls, I have to white balance by hand in lightroom after the fact.

 

I typically eyedrop the off white ceiling and warm it up a few clicks. I do this hundreds of times a night.

 

I dream of an ability to select the off white ceiling in my photoshop action and white balance it and it alone (thus avoiding the colored walls that trick the automation)

 

Then I'd like to paste that white balance adjustment on to the entire image in photoshop... basically it's the automated version of clicking the ceiling 100s of times a night.

 

I have no problem selecting the ceilings, I just don't know how to auto white balance that selection in photoshop (and then paste those adjustments on to the entire image) is this possible?


Getting selected layers by script (object refs, not indices!)

$
0
0

Hey guys - I'm working on a simple photoshop CC script that exports selected layers, but I'm having some problems with the selection code.

Googling around I found a helpful snippet that returns a list of layer index values for my selected layers - however the returned indices don't equate to the indices I get when simply using app.activeDocument.layers().

Can anyone suggest a method to get references to the layer objects that are selected? - or perhaps a function to convert the document indices from the function below to their respective layer objects?

 

Many thanks in advance!

 

function getSelectedLayersIdx(){

     var selectedLayers = new Array;

     var ref = new ActionReference();

     ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );

     var desc = executeActionGet(ref);

     if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){

          desc = desc.getList( stringIDToTypeID( 'targetLayers' ));

          var c = desc.count

          var selectedLayers = new Array();

          for(var i=0;i<c;i++){

               selectedLayers.push(  desc.getReference( i ).getIndex());

          }

     }else{

          var ref = new ActionReference();

          ref.putProperty( charIDToTypeID('Prpr') , charIDToTypeID( 'ItmI' ));

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

          selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( 'ItmI' )));

     }

     return selectedLayers;

}

 

var doc = app.activeDocument;

var layersIndx = getSelectedLayersIdx(doc);

alert("Selected layers indx: "+layersIndx);

 

for(i =0; i<layersIndx.length; i++){

    index= layersIndx[i];

    alert("Index: "+index+" Name: "+doc.layers[index].name);

}

ExtendScript - using require('') function?

$
0
0

Hello all,

 

I'm relatively new to this whole scripting thing - at least with ExtendScript and JavaScript.

 

I have a bunch of editing I need to do in order to organize an event.  I have already figured out how to modify the photoshop document to update posters, times, etc - but there is also a word document that I would like to modify as well.

 

I have found some potential useful projects on github, but the problem is that ExtendScript does not seem to have native support for the require('x') function that most of these projects use.

 

I've been trying to figure this out off an on throughout the last two weeks with minimal success.

 

Does anyone have any ideas on what I need to do in order to get the require('x') function to work?  It seems that it is supposed to be node.js - but for some reason it is not executing from within ExtendScript IDE.

 

Any help, tips, pointers, or link to useful info would be much appreciated!

 

Thanks!

Photoshop javascript: Open files in all subfolders

$
0
0

Hi guys

 

I'm very new to javascript, and general Photoshop scripting. My script is coming on well, but I struggle working with files and folders. It's a lack of basic javascript knowledge, which I need to work on. Right now, I'm trying to expand the image open part of my script, so that it opens images regardless of whether they are in a subfolder or not.

 

You can see my input folder (C:/Input). I want to be able to throw files in there, some in folders, some not. Out of interest, my outputs will be combined into one output folder... that bit is fine.

 

 

var inFolder = new Folder("C:/Input")

if(inFolder != null){

var fileList = inFolder.getFiles(/\.(jpg|tif|psd|bmp|gif|png|)$/i);

}

for(var a = 0 ;a < fileList.length; a++)

{

var docRef = open(fileList[a]);

//do things here

}

 

Is there an easy way of expanding this to include files in subfolders? All advice greatly appreciated.

Thanks

David

Brush kind tools: spacing is always 25% by script

$
0
0

When I try to put the spacing of any brush type tool, it gets all the values but not the Spacing value [1-1000]

Is it a bug?

 

For example, when I try to put 2% has spacing value, the result will be always 25%. The same happens when I try other values. The result is 25%

Diameter,Hardness,Angle,Roundness,Flipy,Flipx are working well, but not Spacing

 

setBrushFeatures(130, 40,undefined,undefined,2,undefined,undefined);

function setBrushFeatures (Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx) {
    var ref = new ActionReference();    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );    var appDesc = executeActionGet(ref);    var toolDesc = appDesc.getObjectValue(stringIDToTypeID('currentToolOptions'));    var brushDesc = toolDesc.getObjectValue(stringIDToTypeID('brush'));    if (Diameter == undefined) Diameter = brushDesc.getDouble(stringIDToTypeID('diameter'));    if (Hardness == undefined) Hardness = brushDesc.getDouble(stringIDToTypeID('hardness'));    if (Angle == undefined ) Angle = brushDesc.getDouble(stringIDToTypeID('angle'));    if (Roundness  == undefined) Roundness = brushDesc.getDouble(stringIDToTypeID('roundness'));    if (Spacing == undefined) Spacing = brushDesc.getDouble(stringIDToTypeID('spacing'));    if (Flipy == undefined) Flipy = brushDesc.getBoolean(stringIDToTypeID('flipY'));    if (Flipx == undefined) Flipx = brushDesc.getBoolean(stringIDToTypeID('flipX'));    var desc = new ActionDescriptor();    var ref = new ActionReference();    ref.putEnumerated( charIDToTypeID( "Brsh" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );    desc.putReference( charIDToTypeID( "null" ), ref );    var desc1 = new ActionDescriptor();    desc1.putDouble(stringIDToTypeID('diameter'), Diameter);    desc1.putDouble(stringIDToTypeID('hardness'), Hardness);    desc1.putDouble(stringIDToTypeID('angle'), Angle);    desc1.putDouble(stringIDToTypeID('roundness'), Roundness);    desc1.putDouble(stringIDToTypeID('spacing'), Spacing);  // ??????????????  Allways 25%  !!    desc1.putBoolean(stringIDToTypeID('flipY'), Flipy);    desc1.putBoolean(stringIDToTypeID('flipX'), Flipx);    desc.putObject( stringIDToTypeID('to'), charIDToTypeID( "Brsh" ), desc1 );    executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
}

What Values do I need to keep aspct ratio?

$
0
0

Hey...

Can someone help me out about what values should I change to keep the aspect ratio? I've seen some comments inside the code where there is supposed to change something, but I'm new to Scripts so I don't know exactly what to change.
Thanks in advance...

Viewing all 12244 articles
Browse latest View live


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