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

Load different image after 3 seconds on a palette

Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

Hello everyone, a good week for everyone! Is there any way to load a sequence of 4 images.png "one at a time" every 3 seconds in the same coordinate in a palette. Each image would have 3 seconds of display: image1.png: 3seconds later = upload image2.png .... 3 seconds after uploading image3.png / 3 seconds after uploading image4.png My idea here is to improvise a kind of window like: Wait! Processing ...

TOPICS
Actions and scripting

Views

862

Translate

Translate

Report

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

correct answers 1 Correct answer

People's Champ , Dec 04, 2017 Dec 04, 2017

OK. It is advisable to upgrade to version 19.0.1.

Look what happened. It seems to work.

There are 6 modifications in your script. They are labeled as // MODIFICATION !!!!!

One at the beginning, the rest at the very end.

The script a.jsx - Google Drive

P.S. Although all this garbage. It is necessary to use normal progressbar.

Votes

Translate

Translate
Adobe
People's Champ ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

I did not understand anything, but I can offer.
Open the first image. Turn the layer into a smart object.
Do delay in 3 seconds. Then in the loop do Replace content.on the next image and do a delay

Votes

Translate

Translate

Report

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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

Hi  r-bin Is it through images that I communicate better? It would work like a gif.

Screenshot_1.png

imge 1.png

imge 2.png

imge 3.png

imge 4.png

  function drawButton() {

      this.graphics.drawImage(this.image, 0, 0);

  }

myPrs = new Window('palette', 'Processing image'); 

     myPrs.orientation = 'column'; 

     myPrs.alignment = 'right'; 

     myPrs.ProcessHead  = myPrs.add('statictext',[40,0,260,25], "Batch Processing..."); 

 

  var logo = File("~/Desktop/imge 1.png");

  var logo = myPrs .add("iconbutton", [0, 0, 0, 0], ScriptUI.newImage(logo), )

  logo.onDraw = drawButton;

  logo.location = [10, 2]

 

     var LENGTH = 4; 

 

     myPrs.show(); 

 

     for(i=0;i<1;i++){ 

         var PrCounter = 0; 

         Function1(); 

     } 

  

   

      function Function1(){ 

      // The palette will be displayed the moment some script is executing some function

 

    }

Votes

Translate

Translate

Report

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
People's Champ ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

Well, you almost did everything.

Why not use

function drawButton() { 

          this.graphics.drawImage(this.image, 0, 0); 

      } 

myPrs = new Window('palette', 'Processing image');   

     myPrs.orientation = 'column';   

     myPrs.alignment = 'right';   

     myPrs.ProcessHead  = myPrs.add('statictext',[40,0,260,25], "Batch Processing...");   

   

var img = [ new File("~/Desktop/imge 1.png"),

            new File("~/Desktop/imge 2.png"),  

            new File("~/Desktop/imge 3.png"),  

            new File("~/Desktop/imge 4.png") ];

//var logo = myPrs.add("image", undefined, img[0] ) 

var logo = myPrs .add("iconbutton", undefined, img[0] ) 

logo.onDraw = drawButton;  // if logo == "image" this func not need

logo.location = [10, 2] 

 

var LENGTH = 4;   

myPrs.show();   

for(i=0;i<LENGTH;i++)

    {   

    logo.image = img

    refresh(); //

    var PrCounter = 0;   

    Function1();   

    }

    function Function1(){ $.sleep(500)  

    // The palette will be displayed the moment some script is executing some function 

 

  }  

Using refresh () is a bad option, but there is no time to experiment.

Votes

Translate

Translate

Report

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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

r-bin  i am impressed by your ability to programmer, I am honored to receive your answers! It really worked well until I realized that for every loaded image, my script runs again. Where am I going wrong, how to make this work correctly in my script? I feel frustrated.

Votes

Translate

Translate

Report

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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

This script performs too long a task! All images would have loaded until the script finished executing its function. Will the script have to be broken into 4 parts? if the answer is yes, how can I make it work in practice with this palette?

Here is the script that I want to add a "Wait ... processing" palette

cTID = function(s) { return app.charIDToTypeID(s); };

sTID = function(s) { return app.stringIDToTypeID(s); };

  //////////////  Id-Prints beta 2  ////////////////////////////////

function Id_Printsbeta2() {

  // Make

  function step1(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    //////////////////

    //Risezer Reol 200 DPI

    var doc = activeDocument 

    if(doc.resolution<200){ 

    doc.resizeImage (undefined, undefined, 200, )} 

    runMenuItem(app.charIDToTypeID("FtOn")); 

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putClass(cTID('Lyr '));

    desc1.putReference(cTID('null'), ref1);

    desc1.putInteger(cTID('LyrI'), 3);

    executeAction(cTID('Mk  '), desc1, dialogMode);

  };

  // Reset

  function step2(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Clr '), cTID('Clrs'));

    desc1.putReference(cTID('null'), ref1);

    executeAction(cTID('Rset'), desc1, dialogMode);

  };

  // Set

  function step3(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Clr '), cTID('BckC'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 0);

    desc2.putDouble(cTID('Strt'), 99.6078431372549);

    desc2.putDouble(cTID('Brgh'), 1.17647058823529);

    desc1.putObject(cTID('T   '), cTID('HSBC'), desc2);

    desc1.putString(cTID('Srce'), "photoshopPicker");

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Merge Visible

  function step4(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    executeAction(sTID('mergeVisible'), undefined, dialogMode);

  };

  // Canvas Size

  function step5(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    desc1.putBoolean(cTID('Rltv'), true);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Rlt'), 11.3385826771654);

    desc1.putUnitDouble(cTID('Hght'), cTID('#Rlt'), 11.3385826771654);

    desc1.putEnumerated(cTID('Hrzn'), cTID('HrzL'), cTID('Cntr'));

    desc1.putEnumerated(cTID('Vrtc'), cTID('VrtL'), cTID('Cntr'));

    desc1.putEnumerated(sTID("canvasExtensionColorType"), sTID("canvasExtensionColorType"), cTID('Clr '));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 0);

    desc2.putDouble(cTID('Strt'), 0);

    desc2.putDouble(cTID('Brgh'), 100);

    desc1.putObject(sTID("canvasExtensionColor"), cTID('HSBC'), desc2);

    executeAction(sTID('canvasSize'), desc1, dialogMode);

  };

  // Set

  function step6(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Path'), cTID('WrPt'));

    desc1.putReference(cTID('null'), ref1);

    var list1 = new ActionList();

    var desc2 = new ActionDescriptor();

    desc2.putEnumerated(sTID("shapeOperation"), sTID("shapeOperation"), cTID('Add '));

    var list2 = new ActionList();

    var desc3 = new ActionDescriptor();

    desc3.putBoolean(cTID('Clsp'), true);

    var list3 = new ActionList();

    var desc4 = new ActionDescriptor();

    var desc5 = new ActionDescriptor();

    desc5.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc5.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc4.putObject(cTID('Anch'), cTID('Pnt '), desc5);

    list3.putObject(cTID('Pthp'), desc4);

    var desc6 = new ActionDescriptor();

    var desc7 = new ActionDescriptor();

    desc7.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 43.2);

    desc7.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc6.putObject(cTID('Anch'), cTID('Pnt '), desc7);

    list3.putObject(cTID('Pthp'), desc6);

    var desc8 = new ActionDescriptor();

    var desc9 = new ActionDescriptor();

    desc9.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 43.2);

    desc9.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 2.88);

    desc8.putObject(cTID('Anch'), cTID('Pnt '), desc9);

    list3.putObject(cTID('Pthp'), desc8);

    var desc10 = new ActionDescriptor();

    var desc11 = new ActionDescriptor();

    desc11.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc11.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 2.88);

    desc10.putObject(cTID('Anch'), cTID('Pnt '), desc11);

    list3.putObject(cTID('Pthp'), desc10);

    desc3.putList(cTID('Pts '), list3);

    list2.putObject(cTID('Sbpl'), desc3);

    desc2.putList(cTID('SbpL'), list2);

    list1.putObject(cTID('PaCm'), desc2);

    desc1.putList(cTID('T   '), list1);

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Make

  function step7(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putClass(cTID('Path'));

    desc1.putReference(cTID('null'), ref1);

    var ref2 = new ActionReference();

    ref2.putEnumerated(cTID('Path'), cTID('Path'), sTID("vectorMask"));

    ref2.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('From'), ref2);

    desc1.putString(cTID('Nm  '), "mark");

    executeAction(cTID('Mk  '), desc1, dialogMode);

  };

  // Transform

  function step8(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Path'), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSSide0"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Prc'), 99.6336996336996);

    desc1.putUnitDouble(cTID('Hght'), cTID('#Prc'), 90.0562851782364);

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Make

  function step9(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putClass(cTID('Lyr '));

    desc1.putReference(cTID('null'), ref1);

    desc1.putInteger(cTID('LyrI'), 15);

    executeAction(cTID('Mk  '), desc1, dialogMode);

  };

  // Set

  function step10(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putString(cTID('Nm  '), "base");

    desc1.putObject(cTID('T   '), cTID('Lyr '), desc2);

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Set

  function step11(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    var ref2 = new ActionReference();

    ref2.putEnumerated(cTID('Path'), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('T   '), ref2);

    desc1.putInteger(cTID('Vrsn'), 1);

    desc1.putBoolean(sTID("vectorMaskParams"), true);

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Fill

  function step12(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    desc1.putEnumerated(cTID('Usng'), cTID('FlCn'), cTID('BckC'));

    desc1.putUnitDouble(cTID('Opct'), cTID('#Prc'), 100);

    desc1.putEnumerated(cTID('Md  '), cTID('BlnM'), cTID('Nrml'));

    executeAction(cTID('Fl  '), desc1, dialogMode);

  };

  // Set

  function step13(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Set

  function step14(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step15(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSLefts"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Align

  function step16(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSTops"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Set

  function step17(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Layer Via Copy

  function step18(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    executeAction(sTID('copyToLayer'), undefined, dialogMode);

  };

  // Transform

  function step19(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Angl'), cTID('#Ang'), 90);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Set

  function step20(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step21(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSLefts"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Transform

  function step22(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Prc'), -100);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Align

  function step23(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSTops"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Set

  function step24(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Merge Layers

  function step25(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    executeAction(sTID('mergeLayersNew'), desc1, dialogMode);

  };

  // Layer Via Copy

  function step26(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    executeAction(sTID('copyToLayer'), undefined, dialogMode);

  };

  // Transform

  function step27(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Prc'), -100);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Set

  function step28(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step29(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSRights"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Set

  function step30(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Merge Layers

  function step31(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    executeAction(sTID('mergeLayersNew'), desc1, dialogMode);

  };

  // Layer Via Copy

  function step32(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    executeAction(sTID('copyToLayer'), undefined, dialogMode);

  };

  // Transform

  function step33(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Hght'), cTID('#Prc'), -100);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Set

  function step34(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step35(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSBottoms"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Set

  function step36(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Merge Layers

  function step37(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    executeAction(sTID('mergeLayersNew'), desc1, dialogMode);

  };

  // Merge Layers

  function step38(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    executeAction(sTID('mergeLayersNew'), desc1, dialogMode);

  };

  // Canvas Size

  function step39(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    desc1.putBoolean(cTID('Rltv'), true);

    desc1.putUnitDouble(cTID('Hght'), cTID('#Rlt'), 17.007874015748);

    desc1.putEnumerated(cTID('Vrtc'), cTID('VrtL'), cTID('Top '));

    desc1.putEnumerated(sTID("canvasExtensionColorType"), sTID("canvasExtensionColorType"), cTID('Clr '));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 0);

    desc2.putDouble(cTID('Strt'), 0);

    desc2.putDouble(cTID('Brgh'), 100);

    desc1.putObject(sTID("canvasExtensionColor"), cTID('HSBC'), desc2);

    executeAction(sTID('canvasSize'), desc1, dialogMode);

  };

  // Set

  function step40(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Clr '), cTID('FrgC'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('H   '), cTID('#Ang'), 0);

    desc2.putDouble(cTID('Strt'), 100);

    desc2.putDouble(cTID('Brgh'), 0);

    desc1.putObject(cTID('T   '), cTID('HSBC'), desc2);

    desc1.putString(cTID('Srce'), "photoshopPicker");

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Make

  function step41(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putClass(cTID('TxLr'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putString(cTID('Txt '), "Hollywood ID:");

    var desc3 = new ActionDescriptor();

    desc3.putEnumerated(sTID("warpStyle"), sTID("warpStyle"), sTID("warpNone"));

    desc3.putDouble(sTID("warpValue"), 0);

    desc3.putDouble(sTID("warpPerspective"), 0);

    desc3.putDouble(sTID("warpPerspectiveOther"), 0);

    desc3.putEnumerated(sTID("warpRotate"), cTID('Ornt'), cTID('Hrzn'));

    desc2.putObject(cTID('warp'), cTID('warp'), desc3);

    var desc4 = new ActionDescriptor();

    desc4.putUnitDouble(cTID('Hrzn'), cTID('#Prc'), 8.18713450292398);

    desc4.putUnitDouble(cTID('Vrtc'), cTID('#Prc'), 98.0952380952381);

    desc2.putObject(cTID('TxtC'), cTID('Pnt '), desc4);

    desc2.putEnumerated(sTID("textGridding"), sTID("textGridding"), cTID('None'));

    desc2.putEnumerated(cTID('Ornt'), cTID('Ornt'), cTID('Hrzn'));

    desc2.putEnumerated(cTID('AntA'), cTID('Annt'), cTID('AnSm'));

    var desc5 = new ActionDescriptor();

    desc5.putUnitDouble(cTID('Left'), cTID('#Pxl'), -70.414306640625);

    desc5.putUnitDouble(cTID('Top '), cTID('#Pxl'), -20.595703125);

    desc5.putUnitDouble(cTID('Rght'), cTID('#Pxl'), 70.4144439697266);

    desc5.putUnitDouble(cTID('Btom'), cTID('#Pxl'), 7.79296875);

    desc2.putObject(sTID("bounds"), sTID("bounds"), desc5);

    var desc6 = new ActionDescriptor();

    desc6.putUnitDouble(cTID('Left'), cTID('#Pxl'), -68.414306640625);

    desc6.putUnitDouble(cTID('Top '), cTID('#Pxl'), -17);

    desc6.putUnitDouble(cTID('Rght'), cTID('#Pxl'), 67.8302307128906);

    desc6.putUnitDouble(cTID('Btom'), cTID('#Pxl'), 5);

    desc2.putObject(sTID("boundingBox"), sTID("boundingBox"), desc6);

    var list1 = new ActionList();

    var desc7 = new ActionDescriptor();

    desc7.putEnumerated(sTID("textType"), sTID("textType"), cTID('Pnt '));

    desc7.putEnumerated(cTID('Ornt'), cTID('Ornt'), cTID('Hrzn'));

    var desc8 = new ActionDescriptor();

    desc8.putDouble(sTID("xx"), 1);

    desc8.putDouble(sTID("xy"), 0);

    desc8.putDouble(sTID("yx"), 0);

    desc8.putDouble(sTID("yy"), 1);

    desc8.putDouble(sTID("tx"), 0);

    desc8.putDouble(sTID("ty"), 0);

    desc7.putObject(cTID('Trnf'), cTID('Trnf'), desc8);

    desc7.putInteger(sTID("rowCount"), 1);

    desc7.putInteger(sTID("columnCount"), 1);

    desc7.putBoolean(sTID("rowMajorOrder"), true);

    desc7.putUnitDouble(sTID("rowGutter"), cTID('#Pxl'), 0);

    desc7.putUnitDouble(sTID("columnGutter"), cTID('#Pxl'), 0);

    desc7.putUnitDouble(cTID('Spcn'), cTID('#Pxl'), 0);

    desc7.putEnumerated(sTID("frameBaselineAlignment"), sTID("frameBaselineAlignment"), sTID("alignByAscent"));

    desc7.putUnitDouble(sTID("firstBaselineMinimum"), cTID('#Pxl'), 0);

    var desc9 = new ActionDescriptor();

    desc9.putDouble(cTID('Hrzn'), 0);

    desc9.putDouble(cTID('Vrtc'), 0);

    desc7.putObject(cTID('base'), cTID('Pnt '), desc9);

    list1.putObject(sTID("textShape"), desc7);

    desc2.putList(sTID("textShape"), list1);

    var list2 = new ActionList();

    var desc10 = new ActionDescriptor();

    desc10.putInteger(cTID('From'), 0);

    desc10.putInteger(cTID('T   '), 14);

    var desc11 = new ActionDescriptor();

    desc11.putBoolean(sTID("styleSheetHasParent"), true);

    desc11.putString(sTID("fontPostScriptName"), "ArialMT");

    desc11.putString(cTID('FntN'), "Arial");

    desc11.putString(cTID('FntS'), "Regular");

    desc11.putInteger(cTID('Scrp'), 0);

    desc11.putInteger(cTID('FntT'), 1);

    desc11.putBoolean(sTID("fontAvailable"), true);

    desc11.putUnitDouble(cTID('Sz  '), cTID('#Pxl'), 24);

    desc11.putUnitDouble(sTID("impliedFontSize"), cTID('#Pxl'), 24);

    desc11.putDouble(cTID('HrzS'), 89.9999976158142);

    desc11.putBoolean(sTID("syntheticBold"), true);

    desc11.putUnitDouble(sTID("markYDistFromBaseline"), cTID('#Pxl'), 100);

    desc11.putBoolean(sTID("altligature"), true);

    desc11.putEnumerated(sTID("textLanguage"), sTID("textLanguage"), sTID("brazilianPortugueseLanguage"));

    var desc12 = new ActionDescriptor();

    desc12.putString(sTID("fontPostScriptName"), "MyriadPro-Regular");

    desc12.putString(cTID('FntN'), "Myriad Pro");

    desc12.putString(cTID('FntS'), "Regular");

    desc12.putInteger(cTID('Scrp'), 0);

    desc12.putInteger(cTID('FntT'), 0);

    desc12.putBoolean(sTID("fontAvailable"), true);

    desc12.putUnitDouble(cTID('Sz  '), cTID('#Pxl'), 12);

    desc12.putUnitDouble(sTID("impliedFontSize"), cTID('#Pxl'), 12);

    desc12.putDouble(cTID('HrzS'), 100);

    desc12.putDouble(cTID('VrtS'), 100);

    desc12.putBoolean(sTID("syntheticBold"), false);

    desc12.putBoolean(sTID("syntheticItalic"), false);

    desc12.putBoolean(sTID("autoLeading"), true);

    desc12.putInteger(cTID('Trck'), 0);

    desc12.putUnitDouble(cTID('Bsln'), cTID('#Pxl'), 0);

    desc12.putUnitDouble(sTID("impliedBaselineShift"), cTID('#Pxl'), 0);

    desc12.putDouble(sTID("characterRotation"), 0);

    desc12.putEnumerated(cTID('AtKr'), cTID('AtKr'), sTID("metricsKern"));

    desc12.putEnumerated(sTID("fontCaps"), sTID("fontCaps"), cTID('Nrml'));

    desc12.putEnumerated(sTID("digitSet"), sTID("digitSet"), sTID("defaultDigits"));

    desc12.putEnumerated(sTID("dirOverride"), sTID("dirOverride"), sTID("dirOverrideDefault"));

    desc12.putEnumerated(sTID("kashidas"), sTID("kashidas"), sTID("kashidaDefault"));

    desc12.putEnumerated(sTID("diacVPos"), sTID("diacVPos"), sTID("diacVPosOpenType"));

    desc12.putUnitDouble(sTID("diacXOffset"), cTID('#Pxl'), 0);

    desc12.putUnitDouble(sTID("diacYOffset"), cTID('#Pxl'), 0);

    desc12.putUnitDouble(sTID("markYDistFromBaseline"), cTID('#Pxl'), 100);

    desc12.putEnumerated(sTID("baseline"), sTID("baseline"), cTID('Nrml'));

    desc12.putEnumerated(sTID("otbaseline"), sTID("otbaseline"), cTID('Nrml'));

    desc12.putEnumerated(sTID("strikethrough"), sTID("strikethrough"), sTID("strikethroughOff"));

    desc12.putEnumerated(cTID('Undl'), cTID('Undl'), sTID("underlineOff"));

    desc12.putUnitDouble(sTID("underlineOffset"), cTID('#Pxl'), 0);

    desc12.putBoolean(sTID("ligature"), true);

    desc12.putBoolean(sTID("altligature"), false);

    desc12.putBoolean(sTID("contextualLigatures"), false);

    desc12.putBoolean(sTID("alternateLigatures"), false);

    desc12.putBoolean(sTID("oldStyle"), false);

    desc12.putBoolean(sTID("fractions"), false);

    desc12.putBoolean(sTID("ordinals"), false);

    desc12.putBoolean(sTID("swash"), false);

    desc12.putBoolean(sTID("titling"), false);

    desc12.putBoolean(sTID("connectionForms"), false);

    desc12.putBoolean(sTID("stylisticAlternates"), false);

    desc12.putBoolean(sTID("ornaments"), false);

    desc12.putBoolean(sTID("justificationAlternates"), false);

    desc12.putEnumerated(sTID("figureStyle"), sTID("figureStyle"), cTID('Nrml'));

    desc12.putBoolean(sTID("proportionalMetrics"), false);

    desc12.putBoolean(cTID('kana'), false);

    desc12.putBoolean(sTID("italics"), false);

    desc12.putBoolean(cTID('ruby'), false);

    desc12.putEnumerated(sTID("baselineDirection"), sTID("baselineDirection"), sTID("rotated"));

    desc12.putEnumerated(sTID("textLanguage"), sTID("textLanguage"), sTID("englishLanguage"));

    desc12.putEnumerated(sTID("japaneseAlternate"), sTID("japaneseAlternate"), sTID("defaultForm"));

    desc12.putDouble(sTID("mojiZume"), 0);

    desc12.putEnumerated(sTID("gridAlignment"), sTID("gridAlignment"), sTID("roman"));

    desc12.putBoolean(sTID("enableWariChu"), false);

    desc12.putInteger(sTID("wariChuCount"), 2);

    desc12.putInteger(sTID("wariChuLineGap"), 0);

    desc12.putDouble(sTID("wariChuScale"), 0.5);

    desc12.putInteger(sTID("wariChuWidow"), 2);

    desc12.putInteger(sTID("wariChuOrphan"), 2);

    desc12.putEnumerated(sTID("wariChuJustification"), sTID("wariChuJustification"), sTID("wariChuAutoJustify"));

    desc12.putInteger(sTID("tcyUpDown"), 0);

    desc12.putInteger(sTID("tcyLeftRight"), 0);

    desc12.putDouble(sTID("leftAki"), -1);

    desc12.putDouble(sTID("rightAki"), -1);

    desc12.putInteger(sTID("jiDori"), 0);

    desc12.putBoolean(sTID("noBreak"), false);

    var desc13 = new ActionDescriptor();

    desc13.putDouble(cTID('Rd  '), 0);

    desc13.putDouble(cTID('Grn '), 0);

    desc13.putDouble(cTID('Bl  '), 0);

    desc12.putObject(cTID('Clr '), sTID("RGBColor"), desc13);

    var desc14 = new ActionDescriptor();

    desc14.putDouble(cTID('Rd  '), 0);

    desc14.putDouble(cTID('Grn '), 0);

    desc14.putDouble(cTID('Bl  '), 0);

    desc12.putObject(sTID("strokeColor"), sTID("RGBColor"), desc14);

    desc12.putBoolean(cTID('Fl  '), true);

    desc12.putBoolean(cTID('Strk'), false);

    desc12.putBoolean(sTID("fillFirst"), true);

    desc12.putBoolean(sTID("fillOverPrint"), false);

    desc12.putBoolean(sTID("strokeOverPrint"), false);

    desc12.putEnumerated(sTID("lineCap"), sTID("lineCap"), sTID("buttCap"));

    desc12.putEnumerated(sTID("lineJoin"), sTID("lineJoin"), sTID("miterJoin"));

    desc12.putUnitDouble(sTID("lineWidth"), cTID('#Pxl'), 1);

    desc12.putUnitDouble(sTID("miterLimit"), cTID('#Pxl'), 4);

    desc12.putDouble(sTID("lineDashoffset"), 0);

    desc11.putObject(sTID("baseParentStyle"), cTID('TxtS'), desc12);

    desc10.putObject(cTID('TxtS'), cTID('TxtS'), desc11);

    list2.putObject(cTID('Txtt'), desc10);

    desc2.putList(cTID('Txtt'), list2);

    var list3 = new ActionList();

    var desc15 = new ActionDescriptor();

    desc15.putInteger(cTID('From'), 0);

    desc15.putInteger(cTID('T   '), 14);

    var desc16 = new ActionDescriptor();

    desc16.putBoolean(sTID("styleSheetHasParent"), true);

    desc16.putEnumerated(cTID('Algn'), cTID('Alg '), cTID('Cntr'));

    desc16.putBoolean(sTID("hyphenate"), true);

    desc16.putInteger(sTID("hyphenateWordSize"), 8);

    desc16.putInteger(sTID("hyphenatePreLength"), 3);

    desc16.putInteger(sTID("hyphenatePostLength"), 3);

    desc16.putInteger(sTID("hyphenateLimit"), 2);

    desc16.putDouble(sTID("hyphenationZone"), 36);

    desc16.putBoolean(sTID("hyphenateCapitalized"), true);

    desc15.putObject(sTID("paragraphStyle"), sTID("paragraphStyle"), desc16);

    list3.putObject(sTID("paragraphStyleRange"), desc15);

    desc2.putList(sTID("paragraphStyleRange"), list3);

    var list4 = new ActionList();

    desc2.putList(sTID("kerningRange"), list4);

    desc1.putObject(cTID('Usng'), cTID('TxLr'), desc2);

    desc1.putInteger(cTID('LyrI'), 89);

    executeAction(cTID('Mk  '), desc1, dialogMode);

  };

  // Set

  function step42(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('Al  '));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step43(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSLefts"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Align

  function step44(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSBottoms"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Set

  function step45(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Move

  function step46(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0.36);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), 0);

    desc1.putObject(cTID('T   '), cTID('Ofst'), desc2);

    executeAction(cTID('move'), desc1, dialogMode);

  };

  // Move

  function step47(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 2.16);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), -0.36);

    desc1.putObject(cTID('T   '), cTID('Ofst'), desc2);

    executeAction(cTID('move'), desc1, dialogMode);

  };

  // Scripts

  function step48(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    /////////

    if (app.documents.length > 0) {

    var myDocument = app.activeDocument;

    var originalUnits = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    // getting the name; 

    var docName = myDocument.name;

    //var basename = docName.match(/(.*)\.[^\.]+$/)[1]; 

    //getting the location; 

    var docPath = decodeURI(myDocument.path);

    // make the layer; 

    var myLayerRef = myDocument.artLayers.add();

    myLayerRef.kind = LayerKind.TEXT;

    myLayerRef.name = "text";

    var myTextRef = myLayerRef.textItem;

    myTextRef.size = 11;

    myTextRef.font = "Arial";

    myTextRef.justification = Justification.RIGHT;

    //Set text colour in RGB values 

    var newColor = new SolidColor();

    newColor.rgb.red = 192;

    newColor.rgb.green = 44;

    newColor.rgb.blue = 44;

    myTextRef.color = newColor;

    // Set the position of the text - percentages from left first, then from top. 

    myTextRef.position = new Array(myDocument.width - 670, myDocument.height - 1640);

    myLayerRef.blendMode = BlendMode.NORMAL;

    myLayerRef.opacity = 100;

    myTextRef.contents = docPath.toString();

    app.preferences.rulerUnits = originalUnits;

    };

    //////////

  };

  // Set

  function step49(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    var ref2 = new ActionReference();

    ref2.putEnumerated(cTID('Chnl'), cTID('Chnl'), cTID('Trsp'));

    ref2.putName(cTID('Lyr '), "Hollywood ID:");

    desc1.putReference(cTID('T   '), ref2);

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Align

  function step50(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSCentersV"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Align

  function step51(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('Usng'), cTID('ADSt'), sTID("ADSRights"));

    executeAction(cTID('Algn'), desc1, dialogMode);

  };

  // Delete

  function step52(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Path'), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    executeAction(cTID('Dlt '), desc1, dialogMode);

  };

  // Set

  function step53(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putProperty(cTID('Chnl'), sTID("selection"));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('T   '), cTID('Ordn'), cTID('None'));

    executeAction(cTID('setd'), desc1, dialogMode);

  };

  // Transform

  function step54(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSSide1"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0.53993957519531);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), -0.19146929740906);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Prc'), -100.360900342253);

    desc1.putUnitDouble(cTID('Hght'), cTID('#Prc'), 99.3555158356269);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Transform

  function step55(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

    desc1.putReference(cTID('null'), ref1);

    desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));

    var desc2 = new ActionDescriptor();

    desc2.putUnitDouble(cTID('Hrzn'), cTID('#Rlt'), 0.18);

    desc2.putUnitDouble(cTID('Vrtc'), cTID('#Rlt'), -1.63709046319127e-13);

    desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);

    desc1.putUnitDouble(cTID('Wdth'), cTID('#Prc'), -100);

    desc1.putEnumerated(cTID('Intr'), cTID('Intp'), cTID('Bcbc'));

    executeAction(cTID('Trnf'), desc1, dialogMode);

  };

  // Flatten Image

  function step56(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

    var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);

    executeAction(sTID('flattenImage'), undefined, dialogMode);

    //////////////

    /////Destranca BG

   function promoteBackgroundLayer() {

   var doc = activeDocument;

   var layers = doc.layers;

   var layer = layers[layers.length - 1];

   if (layer.isBackgroundLayer) {layer.name = 'Background';}}

   if (documents.length) {promoteBackgroundLayer();}

   /////////////

  };

  step1();      // Make

  step2();      // Reset

  step3();      // Set

  step4();      // Merge Visible

  step5();      // Canvas Size

  step6();      // Set

  step7();      // Make

  step8();      // Transform

  step9();      // Make

  step10();      // Set

  step11();      // Set

  step12();      // Fill

  step13();      // Set

  step14();      // Set

  step15();      // Align

  step16();      // Align

  step17();      // Set

  step18();      // Layer Via Copy

  step19();      // Transform

  step20();      // Set

  step21();      // Align

  step22();      // Transform

  step23();      // Align

  step24();      // Set

  step25();      // Merge Layers

  step26();      // Layer Via Copy

  step27();      // Transform

  step28();      // Set

  step29();      // Align

  step30();      // Set

  step31();      // Merge Layers

  step32();      // Layer Via Copy

  step33();      // Transform

  step34();      // Set

  step35();      // Align

  step36();      // Set

  step37();      // Merge Layers

  step38();      // Merge Layers

  step39();      // Canvas Size

  step40();      // Set

  step41();      // Make

  step42();      // Set

  step43();      // Align

  step44();      // Align

  step45();      // Set

  step46();      // Move

  step47();      // Move

  step48();      // Scripts

  step49();      // Set

  step50();      // Align

  step51();      // Align

  step52();      // Delete

  step53();      // Set

  step54();      // Transform

  step55();      // Transform

  step56();      // Flatten Image

  };

Id_Printsbeta2.main = function () {

  Id_Printsbeta2();

};

Id_Printsbeta2.main();

Votes

Translate

Translate

Report

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
People's Champ ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

Wow!
Do you want to use your png-progress here?
I'll look a little later.
First, tell me which version of Photoshop and OS. Since UI and its bugs (features) vary from version to version.

Votes

Translate

Translate

Report

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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

r-bin  escreveu

Wow!
Do you want to use your png-progress here?
I'll look a little later.
First, tell me which version of Photoshop and OS. Since UI and its bugs (features) vary from version to version.

There are many steps until you complete the entire task in one script! The code is really too big! But it works very well.

I wait the time it takes! The important thing for me is to understand how to properly add my scripts so they can work on this progress bar example using custom images:

This is the version I am using:

Untitled-2.jpg

Votes

Translate

Translate

Report

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
People's Champ ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

OK. It is advisable to upgrade to version 19.0.1.

Look what happened. It seems to work.

There are 6 modifications in your script. They are labeled as // MODIFICATION !!!!!

One at the beginning, the rest at the very end.

The script a.jsx - Google Drive

P.S. Although all this garbage. It is necessary to use normal progressbar.

Votes

Translate

Translate

Report

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
Engaged ,
Dec 04, 2017 Dec 04, 2017

Copy link to clipboard

Copied

LATEST

Wow! Friend r-bin you're a genius! It is perfect! Even in version 19.0 it worked perfectly well. Dude, you do not know how much it's going to be useful to me. Now I understand how it works. Thank you for the precious minutes of dedication and sharing your knowledge. Forever grateful to you.

Votes

Translate

Translate

Report

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