Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

How to get user input for Auto-Align Layers

$
0
0

Anyone know how to get user input when auto-aligning layers? 

 

Setting DialogModes.ALL from the ScriptListener code does not appear to work (as shown below). 


RunMenuItem(app.charIDToTypeID("Algn")); does not seem to be a supported option either.

 

var idAlgn = charIDToTypeID( "Algn" );

    var desc7 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref3 = new ActionReference();

        var idLyr = charIDToTypeID( "Lyr " );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idTrgt = charIDToTypeID( "Trgt" );

        ref3.putEnumerated( idLyr, idOrdn, idTrgt );

    desc7.putReference( idnull, ref3 );

    var idUsng = charIDToTypeID( "Usng" );

    var idADSt = charIDToTypeID( "ADSt" );

    var idADSContent = stringIDToTypeID( "ADSContent" );

    desc7.putEnumerated( idUsng, idADSt, idADSContent );

    var idAply = charIDToTypeID( "Aply" );

    var idprojection = stringIDToTypeID( "projection" );

    var idAuto = charIDToTypeID( "Auto" );

    desc7.putEnumerated( idAply, idprojection, idAuto );

    var idvignette = stringIDToTypeID( "vignette" );

    desc7.putBoolean( idvignette, false );

    var idradialDistort = stringIDToTypeID( "radialDistort" );

    desc7.putBoolean( idradialDistort, false );

executeAction( idAlgn, desc7, DialogModes.ALL );


Viewing all articles
Browse latest Browse all 12244

Trending Articles



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