Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PSE 18 scripts: who to show window for input

New Here ,
Jan 26, 2021 Jan 26, 2021

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

 

 

TOPICS
Actions , How to
201
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2021 Jan 26, 2021

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 );

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2021 Jan 26, 2021
LATEST

Jeff, Thanks, you helped a lot.

volail

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines