Copy link to clipboard
Copied
I work with PSE 2018 on WIN10/64bit
Using scriptingListener I have recorded some steps. Here I show an extrakt, which reflects the problem.
The steps when working manually:
1) duplicate a layer with a picture to edit 2) apply/open Gaussian Blur; this opens a window in which I can set the Parameter (Pixel) for the blur and after 3) enter the Blur will be done.
The Skript that I get with scriptingListener is (after some simplifying edits):
/*
<javascriptresource>
<name>test</name>
<about>creates 16 bit levels adjustment layer</about>
<category>Layers</category>
<menu>automate</menu>
</javascriptresource>
*/
// == duplicate Layer =====================================================
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
// == Gaussian Blur ======================================================
var idGsnB = charIDToTypeID( "GsnB" );
var desc5 = new ActionDescriptor();
var idRds = charIDToTypeID( "Rds " );
var idPxl = charIDToTypeID( "#Pxl" );
desc5.putUnitDouble( idRds, idPxl, 15.000000 );
executeAction( idGsnB, desc5, DialogModes.NO );
This runs fine, but it does not stop to show the Input-window for the Gaussian Blur. So I cannot change the Parameter.
Which changes do I have to make this work.
Note: My problem is the same for all Filters, adjustment layers etc which request input.
TIA volail
Copy link to clipboard
Copied
To get dialogs to show, change the DialogModes.NO to DialogModes.ALL
So for your script to Duplicate Layer and then show the Gaussian Blur dialog it would be
// == duplicate Layer =====================================================
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
// == Gaussian Blur // =======================================================
var idGsnB = charIDToTypeID( "GsnB" );
var desc7 = new ActionDescriptor();
var idRds = charIDToTypeID( "Rds " );
var idPxl = charIDToTypeID( "#Pxl" );
desc7.putUnitDouble( idRds, idPxl, 15.000000 );
executeAction( idGsnB, desc7, DialogModes.ALL );
Copy link to clipboard
Copied
Jeff, Thanks, you helped a lot.
volail