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

Spawn a web page to display image subset

Engaged ,
Aug 25, 2016 Aug 25, 2016

Copy link to clipboard

Copied

Is there a way that one can spawn a web page with subset info from a couple of layers?  Let's say that I compute info from a couple of rgb layers and I wish to view the info on a web page in near real time.  Info would probably be in another layer or two again as rgb.  Reason to go to web page is how I wish to display is not possible, I believe, in Photoshop. 

I expect we need to discuss to get some idea if possible.

Thanks,

RONC

TOPICS
Actions and scripting

Views

715

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

Community Expert , Aug 25, 2016 Aug 25, 2016

I created an action to save an open document current composite view as a png file in temp and converted it to JavaScript with xtools. To that I  add code to write a HTML file to temp to display it in your browser and executed that HTML file.

// A Photoshop Script by JJMack's

// This script is supplied as is. It is provided as freeware.

// The author accepts no liability for any problems arising from its use.

#target photoshop

app.bringToFront();

#target photoshop

cTID = function(s) { return app.charID

...

Votes

Translate

Translate
Adobe
Community Expert ,
Aug 25, 2016 Aug 25, 2016

Copy link to clipboard

Copied

It is possible to write a html file and execute in a Photoshop script. The should start your default web browser for that file or pass the file to your opened browser. So tot could write out the HTML with the information and also save out  a image containing the composite of the layers which is displayed by the html you wrote in the html file you execute.   I do something like that for help with some of my scripts.

try{

   var URL = new File(Folder.temp + "/PhotoCollageToolkit.html");

   URL.open("w");

   URL.writeln('<html><HEAD><meta HTTP-EQUIV="REFRESH" content="0; url=http://www.mouseprints.net/old/dpr/PhotoCollageToolkit.html"></HEAD></HTML>');

   URL.close();

   URL.execute();   // The temp file is created but this fails to open the users default browser using Photoshop CC prior Photoshop versions work

}catch(e){

alert("Error, Can Not Open.");

};

JJMack

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 ,
Aug 25, 2016 Aug 25, 2016

Copy link to clipboard

Copied

JJ,

Thanks a lot and will try tonight.  Never would have guessed the temp file part.

How do I embed a jpg or png or do i just send them to Folder.temp too?

RONC

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
Community Expert ,
Aug 25, 2016 Aug 25, 2016

Copy link to clipboard

Copied

I feel it would be best to save the image file to the temp  you write the html file to.  In the html you include the info you want to display and an image html img tag for the image file you saved to have the browser  display it.  Look at what menu File>export>zoomify does. Its a process like you seem to be drying to do. However it creates many image files and displays them with a browser JavaScript

zoomify looks like this your html would juts be some text and a image img html tag.

<!doctype html>

<html xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml" lang="en">

  <head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <script type="text/javascript" src="ZoomifyImageViewer-min.js"></script>

  <style type="text/css"> #myContainer { width:1920px; height:1080px; margin:auto; border:1px; border-style:solid; border-color:#696969;} </style>

  <script type="text/javascript"> Z.showImage("myContainer", "Sweet-Young-Girl", "zNavigatorVisible=0"); </script>

  </head>

  <body bgcolor=#ffffff>

  <br>

  <div id="myContainer"></div>

  <br><br><br><br>

  <div align='right'><font size="1" face="arial" color="#000000">Powered by <a href="http://www.zoomify.com/" target="_blank"><font color="#000000">Zoomify </font></a></font></div>

  <br>

  </body>

</html>

JJMack

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
Community Expert ,
Aug 25, 2016 Aug 25, 2016

Copy link to clipboard

Copied

I created an action to save an open document current composite view as a png file in temp and converted it to JavaScript with xtools. To that I  add code to write a HTML file to temp to display it in your browser and executed that HTML file.

// A Photoshop Script by JJMack's

// This script is supplied as is. It is provided as freeware.

// The author accepts no liability for any problems arising from its use.

#target photoshop

app.bringToFront();

#target photoshop

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

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

//

//==================== Create New Doc of Composite View in Temp ==============

//

function CreateNetDocofCompositeView() {

  // Set

  function step1(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);

  };

  // Copy Merged

  function step2(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

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

  };

  // Make

  function step3(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    var desc2 = new ActionDescriptor();

    desc2.putString(sTID("preset"), "Clipboard");

    desc1.putObject(cTID('Nw  '), cTID('Dcmn'), desc2);

    desc1.putInteger(cTID('DocI'), 982);

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

  };

  // Paste

  function step4(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    desc1.putEnumerated(cTID('AntA'), cTID('Annt'), cTID('Anno'));

    desc1.putClass(cTID('As  '), cTID('Pxel'));

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

  };

  // Save

  function step5(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    var desc2 = new ActionDescriptor();

    desc2.putEnumerated(sTID("PNGInterlaceType"), sTID("PNGInterlaceType"), sTID("PNGInterlaceNone"));

    desc2.putEnumerated(sTID("PNGFilter"), sTID("PNGFilter"), sTID("PNGFilterAdaptive"));

    desc2.putInteger(cTID('Cmpr'), 9);

    desc1.putObject(cTID('As  '), sTID("PNGFormat"), desc2);

    desc1.putPath(cTID('In  '), new File("~/AppData/Local/Temp/CompositeView.png"));

    desc1.putInteger(cTID('DocI'), 651);

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

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

  };

  // Close

  function step6(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    desc1.putEnumerated(cTID('Svng'), cTID('YsN '), cTID('N   '));

    desc1.putInteger(cTID('DocI'), 561);

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

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

  };

  // Set

  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.putProperty(cTID('Chnl'), sTID("selection"));

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

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

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

  };

  step1();      // Set Select all

  step2();      // Copy Merged composite view to Clipboard

  step3();      // Make new document Clipboard Size

  step4();      // Paste Paste current Compsite view

  step5();      // Save CompositeView.png in Temp

  step6();      // Close Close Nosave Composite View Doc

  step7();      // Set Deselect

};

CreateNetDocofCompositeView()

var HTMLcode = "<html>"

  + "<head>"

  + "<TITLE>Composite View</TITLE>"

  + "</head>"

  + "<body>"

  + "<h1>Composite View</h1>"

  + '<img src="CompositeView.png">'

  + "</body>"

  + "</html>";

try{

   var HTML = new File(Folder.temp + "/CompositeView.html");

   HTML.open("w");

   HTML.writeln(HTMLcode);

   HTML.close();

   HTML.execute();   // The temp file is created but this fails to open the users default browser using Photoshop CC prior Photoshop versions work

}catch(e){

alert("Error, Can Not Open.");

};

JJMack

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 ,
Aug 26, 2016 Aug 26, 2016

Copy link to clipboard

Copied

WOW.

This looks like what I was asking about and much more.  This, I suspect, will be a building block for a number of scripts for me and I hope others find and use it.

I'll be back if I don't understand what you did.

Thanks do much,

RONC

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
Community Expert ,
Aug 26, 2016 Aug 26, 2016

Copy link to clipboard

Copied

If you use this a  model I think I should clean up some of my typos then. Make the converted Action Part somewhat better. For,at the HTML Better and fix up the catch error massage some.  It will take longer to run.  Do not use in Large image files the save of the png would take quite some time. I use windows the Savs a PNG may need to be change on a Mac.

// A Photoshop Script by JJMack's

// This script is supplied as is. It is provided as freeware.

// The author accepts no liability for any problems arising from its use.

#target photoshop

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

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

// Create New Document Of Composite View Save in Temp CompositeView.png

function CreateNewDocOfCompositeView() {

  // Select all

  function step1(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);

  };

  // Copy Merged Conposite View to Clipboard

  function step2(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

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

  };

  // Make New Document Clipboard Size

  function step3(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    var desc2 = new ActionDescriptor();

    desc2.putString(sTID("preset"), "Clipboard");

    desc1.putObject(cTID('Nw  '), cTID('Dcmn'), desc2);

    desc1.putInteger(cTID('DocI'), 822);

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

  };

  // Paste in Current Composite View

  function step4(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    desc1.putEnumerated(cTID('AntA'), cTID('Annt'), cTID('Anno'));

    desc1.putClass(cTID('As  '), cTID('Pxel'));

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

  };

  // Target Bottom Layer

  function step5(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('Back'));

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

    desc1.putBoolean(cTID('MkVs'), false);

    var list1 = new ActionList();

    list1.putInteger(1);

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

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

  };

  // Delete Current Layer Clipboard bottom layer

  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.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));

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

    var list1 = new ActionList();

    list1.putInteger(1);

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

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

  };

  // Save CompositeView.png in Temp Folder

  function step7(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    var desc2 = new ActionDescriptor();

    desc2.putEnumerated(sTID("PNGInterlaceType"), sTID("PNGInterlaceType"), sTID("PNGInterlaceNone"));

    desc2.putEnumerated(sTID("PNGFilter"), sTID("PNGFilter"), sTID("PNGFilterAdaptive"));

    desc2.putInteger(cTID('Cmpr'), 9);

    desc1.putObject(cTID('As  '), sTID("PNGFormat"), desc2);

    desc1.putPath(cTID('In  '), new File("~/AppData/Local/Temp/CompositeView.png"));

    desc1.putInteger(cTID('DocI'), 822);

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

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

  };

  // Close CompositeView No Save

  function step8(enabled, withDialog) {

    if (enabled != undefined && !enabled)

      return;

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

    var desc1 = new ActionDescriptor();

    desc1.putEnumerated(cTID('Svng'), cTID('YsN '), cTID('N   '));

    desc1.putInteger(cTID('DocI'), 822);

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

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

  };

  // Deselect

  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.putProperty(cTID('Chnl'), sTID("selection"));

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

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

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

  };

  step1();      // Select All

  step2();      // Copy Merged Composite View to Clipboard

  step3();      // Make New Document Clipboard Size

  step4();      // Paste in Composite View

  step5();      // Target Bottom Layer

  step6();      // Delete Curremt Layer

  step7();      // Save CompositeView.png in Temp folder

  step8();      // Close Clipboard CompositeView Document No Save

  step9();      // Deselect

};

CreateNewDocOfCompositeView();

var HTMLcode = "<html>\n"

  + "<head>\n"

  + "<TITLE>Composite View</TITLE>\n"

  + "</head>\n"

  + "<body bgcolor=#808080>\n"

  + "<center>\n"

  + "<h1>Composite View</h1\n>"

  + '<img src="CompositeView.png">\n'

  + "</center>\n"

  + "</body>\n"

  + "</html>";

try{

   var HTML = new File(Folder.temp + "/CompositeView.html");

   HTML.open("w");

   HTML.writeln(HTMLcode);

   HTML.close();

   HTML.execute();   // The temp file is created but this fails to open the users default browser using Photoshop CC prior Photoshop versions work

}catch(e){

alert("Error, Can Not Open CompositeView.html in temp");

};

JJMack

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 ,
Aug 26, 2016 Aug 26, 2016

Copy link to clipboard

Copied

I appreciate whatever you do to make it more robust etc.  To me these kind of "drivers" are invaluable to those of us trying to get something to work.  Adobe should have a special place for us to find these.

In my case, I don't see any problem with png and file size but you might comment in the code.  I need no or lossless compression but I can sort that out once you are happy with the innards of the code.

Thanks a lot.

RONC

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
Community Expert ,
Aug 26, 2016 Aug 26, 2016

Copy link to clipboard

Copied

User here do not work for Adobe.  The Code is commented and as far as I know only jpeg uses lossy compression.  Gif only supports up to 256 mapped colors and png supports 8bit and 16bit color any color space.  The Action does not reduce 16bit color to 8bit color or convert to sRGB. The composite view will be save as a png in the source documents  Color space and color depth.  The script may fail it there is only a single layer for the script uses Copy Merge.

I commented the step used in the Action. It would be very simple to recreate my action add any extra steps you need save the action set the Use Xtools to covert the action to script code and replace the top section of my script.  The script is quite simple.  Action Code HTML Code Write the HTML File and execute it.

JJMack

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
Community Expert ,
Aug 27, 2016 Aug 27, 2016

Copy link to clipboard

Copied

Ron wrote

JJ,

First I would like to thank for your help.

I'm going to send you a copy of what you have supplied so far with comments inserted that I think the next users might find helpful for their use.   Is there anything special how I should do so the inserts so you can easily find and copy to your version?

Cheers,

RONC

First use the forum not private massages.  If you want to help others. Private messages will not do that.  Also Jive private message has no spell check and I can not type or spell. You do not want to communicate with me via jive private message.

There are things you also have not learn yet and your comment reflect this. As I stated what I provided was generated with an action converted to a script with Xtools. That I added some javascript added to do what you wanted.  That javascript code added is pure javascript code not Adobe Photoshop DOM javascript code. In fact non of the script code in that script is Adobe Photoshop DOM code.

The First part is all Action Manage code and as such is well commented.   For Adobe generated action manager code is very unreadable.   You see like actions have limitations like no logic and all things photoshop can do can not be recorded Photoshop scripting has even bigger limitations many thing you can do in Photoshop can not be scripted.  That is where Action Manager Code fills in.   Action manager code is also used in some places for Photoshop DOM code may preform slow compared to Action Manager code.  Adobe provides a Plug-in Scriptlistener that records javascript code for steps that can be recorded in actions.  If fact it records everything that you do in Photoshop that can be recorded and the code is not very readable at all. Here is what the 9 step action would look  recorded in scriplistener Action Manager Code.  You will see what I posted is well commented thanks to X. What I posted I would not call Photoshop JavaScript.   I do not even know javascript I just hack a bit. I use Action manager code here for a was lazy and it was an easy hack...

// =======================================================

var idsetd = charIDToTypeID( "setd" );

    var desc6 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref2 = new ActionReference();

        var idChnl = charIDToTypeID( "Chnl" );

        var idfsel = charIDToTypeID( "fsel" );

        ref2.putProperty( idChnl, idfsel );

    desc6.putReference( idnull, ref2 );

    var idT = charIDToTypeID( "T   " );

    var idOrdn = charIDToTypeID( "Ordn" );

    var idAl = charIDToTypeID( "Al  " );

    desc6.putEnumerated( idT, idOrdn, idAl );

executeAction( idsetd, desc6, DialogModes.NO );

// =======================================================

var idCpyM = charIDToTypeID( "CpyM" );

executeAction( idCpyM, undefined, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc7 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc7.putInteger( idLvl, 1 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var identer = stringIDToTypeID( "enter" );

    desc7.putEnumerated( idStte, idStte, identer );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc7.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc7, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc8 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc8.putInteger( idLvl, 0 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var idexit = stringIDToTypeID( "exit" );

    desc8.putEnumerated( idStte, idStte, idexit );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc8.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc8, DialogModes.NO );

// =======================================================

var idMk = charIDToTypeID( "Mk  " );

    var desc9 = new ActionDescriptor();

    var idNw = charIDToTypeID( "Nw  " );

        var desc10 = new ActionDescriptor();

        var idpreset = stringIDToTypeID( "preset" );

        desc10.putString( idpreset, """Clipboard""" );

    var idDcmn = charIDToTypeID( "Dcmn" );

    desc9.putObject( idNw, idDcmn, desc10 );

    var idDocI = charIDToTypeID( "DocI" );

    desc9.putInteger( idDocI, 560 );

executeAction( idMk, desc9, DialogModes.NO );

// =======================================================

var idpast = charIDToTypeID( "past" );

    var desc11 = new ActionDescriptor();

    var idAntA = charIDToTypeID( "AntA" );

    var idAnnt = charIDToTypeID( "Annt" );

    var idAnno = charIDToTypeID( "Anno" );

    desc11.putEnumerated( idAntA, idAnnt, idAnno );

    var idAs = charIDToTypeID( "As  " );

    var idPxel = charIDToTypeID( "Pxel" );

    desc11.putClass( idAs, idPxel );

executeAction( idpast, desc11, DialogModes.NO );

// =======================================================

var idslct = charIDToTypeID( "slct" );

    var desc12 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref3 = new ActionReference();

        var idLyr = charIDToTypeID( "Lyr " );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idBack = charIDToTypeID( "Back" );

        ref3.putEnumerated( idLyr, idOrdn, idBack );

    desc12.putReference( idnull, ref3 );

    var idMkVs = charIDToTypeID( "MkVs" );

    desc12.putBoolean( idMkVs, false );

    var idLyrI = charIDToTypeID( "LyrI" );

        var list1 = new ActionList();

        list1.putInteger( 1 );

    desc12.putList( idLyrI, list1 );

executeAction( idslct, desc12, DialogModes.NO );

// =======================================================

var idDlt = charIDToTypeID( "Dlt " );

    var desc14 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref5 = new ActionReference();

        var idLyr = charIDToTypeID( "Lyr " );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idTrgt = charIDToTypeID( "Trgt" );

        ref5.putEnumerated( idLyr, idOrdn, idTrgt );

    desc14.putReference( idnull, ref5 );

    var idLyrI = charIDToTypeID( "LyrI" );

        var list3 = new ActionList();

        list3.putInteger( 4 );

    desc14.putList( idLyrI, list3 );

executeAction( idDlt, desc14, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc15 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc15.putInteger( idLvl, 1 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var identer = stringIDToTypeID( "enter" );

    desc15.putEnumerated( idStte, idStte, identer );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc15.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc15, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc16 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc16.putInteger( idLvl, 0 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var idexit = stringIDToTypeID( "exit" );

    desc16.putEnumerated( idStte, idStte, idexit );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc16.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc16, DialogModes.NO );

// =======================================================

var idsave = charIDToTypeID( "save" );

    var desc17 = new ActionDescriptor();

    var idAs = charIDToTypeID( "As  " );

        var desc18 = new ActionDescriptor();

        var idPGIT = charIDToTypeID( "PGIT" );

        var idPGIT = charIDToTypeID( "PGIT" );

        var idPGIN = charIDToTypeID( "PGIN" );

        desc18.putEnumerated( idPGIT, idPGIT, idPGIN );

        var idPNGf = charIDToTypeID( "PNGf" );

        var idPNGf = charIDToTypeID( "PNGf" );

        var idPGAd = charIDToTypeID( "PGAd" );

        desc18.putEnumerated( idPNGf, idPNGf, idPGAd );

        var idCmpr = charIDToTypeID( "Cmpr" );

        desc18.putInteger( idCmpr, 9 );

    var idPNGF = charIDToTypeID( "PNGF" );

    desc17.putObject( idAs, idPNGF, desc18 );

    var idIn = charIDToTypeID( "In  " );

    desc17.putPath( idIn, new File( "C:\\Users\\John J McAssey\\AppData\\Local\\Temp\\CompositeVied.png" ) );

    var idDocI = charIDToTypeID( "DocI" );

    desc17.putInteger( idDocI, 560 );

    var idCpy = charIDToTypeID( "Cpy " );

    desc17.putBoolean( idCpy, true );

    var idsaveStage = stringIDToTypeID( "saveStage" );

    var idsaveStageType = stringIDToTypeID( "saveStageType" );

    var idsaveBegin = stringIDToTypeID( "saveBegin" );

    desc17.putEnumerated( idsaveStage, idsaveStageType, idsaveBegin );

executeAction( idsave, desc17, DialogModes.NO );

// =======================================================

var idsave = charIDToTypeID( "save" );

    var desc19 = new ActionDescriptor();

    var idAs = charIDToTypeID( "As  " );

        var desc20 = new ActionDescriptor();

        var idPGIT = charIDToTypeID( "PGIT" );

        var idPGIT = charIDToTypeID( "PGIT" );

        var idPGIN = charIDToTypeID( "PGIN" );

        desc20.putEnumerated( idPGIT, idPGIT, idPGIN );

        var idPNGf = charIDToTypeID( "PNGf" );

        var idPNGf = charIDToTypeID( "PNGf" );

        var idPGAd = charIDToTypeID( "PGAd" );

        desc20.putEnumerated( idPNGf, idPNGf, idPGAd );

        var idCmpr = charIDToTypeID( "Cmpr" );

        desc20.putInteger( idCmpr, 9 );

    var idPNGF = charIDToTypeID( "PNGF" );

    desc19.putObject( idAs, idPNGF, desc20 );

    var idIn = charIDToTypeID( "In  " );

    desc19.putPath( idIn, new File( "C:\\Users\\John J McAssey\\AppData\\Local\\Temp\\CompositeVied.png" ) );

    var idDocI = charIDToTypeID( "DocI" );

    desc19.putInteger( idDocI, 560 );

    var idCpy = charIDToTypeID( "Cpy " );

    desc19.putBoolean( idCpy, true );

    var idsaveStage = stringIDToTypeID( "saveStage" );

    var idsaveStageType = stringIDToTypeID( "saveStageType" );

    var idsaveSucceeded = stringIDToTypeID( "saveSucceeded" );

    desc19.putEnumerated( idsaveStage, idsaveStageType, idsaveSucceeded );

executeAction( idsave, desc19, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc21 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc21.putInteger( idLvl, 1 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var identer = stringIDToTypeID( "enter" );

    desc21.putEnumerated( idStte, idStte, identer );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc21.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc21, DialogModes.NO );

// =======================================================

var idmodalStateChanged = stringIDToTypeID( "modalStateChanged" );

    var desc22 = new ActionDescriptor();

    var idLvl = charIDToTypeID( "Lvl " );

    desc22.putInteger( idLvl, 0 );

    var idStte = charIDToTypeID( "Stte" );

    var idStte = charIDToTypeID( "Stte" );

    var idexit = stringIDToTypeID( "exit" );

    desc22.putEnumerated( idStte, idStte, idexit );

    var idkcanDispatchWhileModal = stringIDToTypeID( "kcanDispatchWhileModal" );

    desc22.putBoolean( idkcanDispatchWhileModal, true );

executeAction( idmodalStateChanged, desc22, DialogModes.NO );

// =======================================================

var idCls = charIDToTypeID( "Cls " );

    var desc23 = new ActionDescriptor();

    var idSvng = charIDToTypeID( "Svng" );

    var idYsN = charIDToTypeID( "YsN " );

    var idN = charIDToTypeID( "N   " );

    desc23.putEnumerated( idSvng, idYsN, idN );

    var idDocI = charIDToTypeID( "DocI" );

    desc23.putInteger( idDocI, 560 );

    var idforceNotify = stringIDToTypeID( "forceNotify" );

    desc23.putBoolean( idforceNotify, true );

executeAction( idCls, desc23, DialogModes.NO );

// =======================================================

var idsetd = charIDToTypeID( "setd" );

    var desc24 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref6 = new ActionReference();

        var idChnl = charIDToTypeID( "Chnl" );

        var idfsel = charIDToTypeID( "fsel" );

        ref6.putProperty( idChnl, idfsel );

    desc24.putReference( idnull, ref6 );

    var idT = charIDToTypeID( "T   " );

    var idOrdn = charIDToTypeID( "Ordn" );

    var idNone = charIDToTypeID( "None" );

    desc24.putEnumerated( idT, idOrdn, idNone );

executeAction( idsetd, desc24, DialogModes.NO );

JJMack

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 ,
Aug 28, 2016 Aug 28, 2016

Copy link to clipboard

Copied

LATEST

Sorry for my interfering.  Please continue as you planned and we'll be happy on this end.

You are extremely helpful.  Thank you,

RONC

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