Quantcast
Channel: Adobe Community : Discussion List - Photoshop Scripting
Viewing all 5448 articles
Browse latest View live

CC 2015

$
0
0

Hi I am using Photoshop CC 2015 & am wanting to swap faces using auto-blend however it doesn't work & I get a message that says "The parameter for command "trim" are not currently valid. Then the auto blend doesn't work can anyone help me with this?!!


HTML5 tabbed extension panel

$
0
0

Hi guys,

 

I'm learning about html5 extension panels, since... you know - with Configurator life was easy.... anyway, I was trying to find example and how-to make panel which allows me to have several tabs in it. With Configurator 4 that was very easy thing to make. Can someone give me simple example of html to get any result with tabs. I'm not that skillful programmer but I can catch few things.

 

Thanks in advance.

Error 8800

$
0
0

I'm getting error 8800 while trying to run a script "The parameters for command make are not currently valid"  Line 98

Listbox columns not working in Photoshop CC 2015

$
0
0

Hi,

 

Just updated from CC 2014 to CC 2015 and my scripts broke. After debugging I've narrowed it down to the use of a listbox with columns. For some reason the new version fails to create the columns at all. ( my full script at gimblll/GBL-Texture-Exporter · GitHub )

 

I narrowed it down to a short example. This fails to produce columns and if the commented line is uncommented, I get a "Not implemented" error. Is anyone else having this problem? Any ideas what's changed or where I'm going wrong? Hopefully the "Not implemented" error doesn't mean that it is actually not implemented, since that would be a pretty huge omission.

 

var win = new Window("dialog", "Test Window");

var panel = win.add("panel");
panel.alignChildren = ["fill", undefined]
panel.preferredSize = [1000, undefined];

var list = panel.add("listbox", undefined, undefined, {
    numberOfColumns: 2,    showHeaders: true,    columnTitles: ["Id", "Resize", ],    });

list.preferredSize = [undefined, 100];

var item1 = list.add ("item", "Test1");
//    item1.subItems[0].text = "Test2";

win.show();

Installing Extension With Davide Barranca's Install Script

$
0
0

Davide Barranca has created a javascript that bypasses Adobe Extension Manager and allows you to create a script that installs extensions, scripts, ect. GO HERE for it.

 

My question is, I have two panels that I want to install with one script. Davide's script only allows one panel to be installed with the script. Is there a way to have another javascript run the first extension js script and then run the second extension script, so both install scripts are installed with one js script.

 

Thanks in advance for your help - Sam

Dialog Window Location in CC 2015?

$
0
0

In Photoshop CC2015, the dialog windows always center themselves regardless of the coordinates given to the window.  I've tried both window.frameLocation and window.location.  This works fine prior to CC2015.  I have this command right before window.show().  I also tried adding window.frameLocation to onShow but it still puts it in the center.  I then tried adding a button to the UI with the window.framelocation and it will move the window to where it is suppose to be.

 

Is there any way to automate a piece of code to run right after the window is drawn?  If so, the window could be moved to the proper location after it is drawn.

 

I think that window.show() is calculating the center and overwriting the location.  I tested by alerting the location just before it is drawn and then adding a button to alert after the window pops up.  The location just before .show() is the correct location that I give it.  After the window appears, the window.frameLocation values that I get from the test button change to the center.  The only code ran between the 2 alerts is window.show() so it must be recalculating the window coordinates.

 

This works prior to CC2015........

 

winX=100;

winY=100;

window.frameLocation=[winX,winY];

window.show();

 

I also tried this variation but the onShow code runs just before the window is drawn.

 

winX=100;

winY=100;

window.onShow=function{window.frameLocation=[winX,winY];}

window.show();

Run code automatically after UI dialog window is drawn?

$
0
0

Is there is a way to automatically run a piece of code after the window is drawn.  Using window.onShow=function(){do stuff} event runs code before the window is drawn.  Is there a similar way to automatically run some code AFTER a dialog window is drawn?

Running Script From Action Is Very Slow

$
0
0

I have created an Action which creates a series of Luminosity Masks as individual Channels.

 

The action takes about 2 seconds to complete when run from the actions pallet.

 

I then took the information from the scripting log, pasted it in as a function in an HTML panel and executed it from a button.

 

The time it takes to run from that method is about 30 seconds compared to the 2 seconds it took to run from the actions pallet.

 

Is there any reason for the speed discrepancy ?


Check A Channel For A Specific Name

$
0
0

Can anyone show or explain the quickest way to check the channels for a specifick name and if found alert the user

Script UI dialog button keyboard shortcuts not working..

$
0
0

Hello,

 

I've tried adding keyboard shortcuts to the buttons in my dialogs using the following code at the end of each button:

 

.shortcutKey = "1";


Like so:


dlg.btnPnl.TieOutfit = dlg.btnPnl.add('button', [6,0,201,20], 'Tie Oufit', {name:'ok'}); dlg.btnPnl.TieOutFit.shortcutKey = "1"; // Tie Outfit

 

Nothing happens when I press 1, or Cmd + 1. I've tested this on both Photoshop CC 2015 and CS6.

 

A bit stuck here and would really appreciate some help!

Turning ScriptListener on and off

$
0
0

One the the things I hated about using ScriptListener was having to quit Photoshop, and either put the ScriptListener plugin in the plugins folder or change the name using the "~" to activate it. After complaining about this, Tom Ruark showed me two scripts that can turn the ScriptListener on and off from within PS - IMO greatest things since sliced bread! Just put the ScriptListener plugin in it's normal place and activated - without the "~" and put the two below scripts in the normal scripts folder.

 

ScriptListenerOn.jsx

 

// Copyright 2012.  Adobe Systems, Incorporated.  All rights reserved.
// The ScriptListener output can be turned on and off without having to uninstall.
// This one turns it on.

// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop

// in case we double clicked the file
app.bringToFront();

var listenerID = stringIDToTypeID("AdobeScriptListener ScriptListener");
var keyLogID = charIDToTypeID('Log ');
var d = new ActionDescriptor;
d.putBoolean(keyLogID, true);
executeAction(listenerID, d, DialogModes.NO);

 

ScriptListenerOff.jsx

 

// Copyright 2012.  Adobe Systems, Incorporated.  All rights reserved.
// The ScriptListener output can be turned on and off without having to uninstall.
// This one turns it off.

// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop

// in case we double clicked the file
app.bringToFront();

var listenerID = stringIDToTypeID("AdobeScriptListener ScriptListener");
var keyLogID = charIDToTypeID('Log ');
var d = new ActionDescriptor;
d.putBoolean(keyLogID, false);
executeAction(listenerID, d, DialogModes.NO);

History Brush Blending Mode

$
0
0

I remember some time ago following a thread on PS-Scripts.com about not been able to access and change the blending mode of the history brush through a script.

 

Unfortunately, PS-Scripts.com is no longer online and I was wondering if things have changed with regards to changing the History Brush blending mode through a script.

psdom

$
0
0

I'm beginning in scripting using ps-dom.  What I want is to create a new document, that is 120x200, followed by adding another layer to the current document. The following code isn't working ?

 

var psdoc = app.documents.add(120,200)

psdoc.activeDocuments.layers.add()

PS-Scripts.com temporarily suspended?

$
0
0

Hi,

I've run into this page when trying to visit good old ps-scripts.com:

 

DB_ 2015-05-18 at 18.48.07.png

 

Never seen anything similar over the years - has anyone some news about it?

Thanks!

 

Davide

Help editing a script

$
0
0

Hi,

 

Very nearly found a solution to this old problem I have. I've found a script that saves groups as PNGs and it's great but I need it to save to JPEGs instead. I also need to have an option to change the name. In the script is fine although I did like the 'export layers to files' pop up box. They are currently named after the group name which I want to keep, just add to. I'm really sorry for my lack of experience when it comes to stuff like this, I know people have suggested ways to do it but I can't understand how to edit the script itself and get it to work.

Many many thanks in advance!!

 

 

 

 

#target photoshop

function main(){

if(!documents.length) return;

var doc = activeDocument;

var oldPath = activeDocument.path;

for(var a=0;a<doc .layerSets.length;a++){

activeDocument.activeLayer = activeDocument.layers.getByName(doc.layerSets[a].name);

dupLayers();

activeDocument.mergeVisibleLayers();

activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);

var saveFile= File(oldPath +"/"+doc.layerSets[a].name +".png");

SavePNG(saveFile);

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

    }

}

main();

function dupLayers() {

    var desc143 = new ActionDescriptor();

        var ref73 = new ActionReference();

        ref73.putClass( charIDToTypeID('Dcmn') );

    desc143.putReference( charIDToTypeID('null'), ref73 );

    desc143.putString( charIDToTypeID('Nm  '), activeDocument.activeLayer.name );

        var ref74 = new ActionReference();

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

    desc143.putReference( charIDToTypeID('Usng'), ref74 );

    executeAction( charIDToTypeID('Mk  '), desc143, DialogModes.NO );

};

function SavePNG(saveFile){

var pngOpts = new ExportOptionsSaveForWeb;

pngOpts.format = SaveDocumentType.PNG

pngOpts.PNG8 = false;

pngOpts.transparency = true;

pngOpts.interlaced = false;

pngOpts.quality = 100;

activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);

}


CC 2015 Font changing not working

$
0
0

Right now I am changing font by getting current font through app.activeDocument.activeLayer.textItem.font

I am not able to do so anymore after 2015 update because the font property isn't present when a text layer is created while using a text tool preset.

 

Does anyone know how to tackle this problem?

Looking for a Script, or Action, or a Preset to divide 24 x 12 in PSD files into two 12 x 12 JPG files

$
0
0

I am looking for a script, or action, or a preset that I can use to divide 24 x 12 inch PSD files into two 12 x 12 JPG files that will save these jpg files into a folder for uploading to a book printing website.  I'm relatively new to PS so was wondering if anyone could point me in the right direction?   Thanks

Help a noob with a script.

$
0
0

I have a number of layers (0,1, 2,..., N), that I need to be copied in a certain way.


1 step) Copy Layers with index: N, N-1, ..., 2, 1, 0.

2 step) Copy Layers with index: N-1, N-2, ..., 2, 1, 0.

3 step) Copy Layers with index: N-2, N-3, ..., 2, 1, 0.

---------------------------------------------------------------------------

N - 1 step) Copy Layers with index:  2, 1, 0.

N step) Copy Layers with index:  1, 0.

Last step) Copy Layer with index:  0.

   

For example i have 4 layers (0,1,2,3)

  1. Copy Layers with index:  3, 2, 1, 0.
  2. Copy Layers with index:  2, 1, 0.
  3. Copy Layers with index:  1, 0.
  4. Copy Layers with index:  0.

So in the end there must be: 1 copy of № 3, 2 copies of № 2, 3 copies of № 1, 4 copies of № 0


Script Code:


var length;

length = app.activeDocument.artLayers.length;

for( var i = length-1; i >= 0; i--)

    {

          for (var y=i; y >= 0; y--)

              {

                    app.activeDocument.layers[y].duplicate();

              }

    }


But it works wrong somehow.

For 4 layers i got in the end: 1 copy of № 3, 1 copy of № 2, 2 copies of № 1, and 6copies of № 0




spreadsheet to text layer script?

$
0
0

Does anyone know of a script that will create a new photoshop file, copy a row of text from a spreadsheet, csv or delimited text from another doc, paste into a text layer, save and close, go to the next row of text and repeat until the end?

Segregating Scripts

$
0
0

Has anyone come up with a solution to organize scripts in the File > Scripts list by segregating scripts into folders, when you visit the File > Scripts list, everything is organized ?

Viewing all 5448 articles
Browse latest View live


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