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

Run Actions Scripts From Extension Panel

$
0
0

Please excuse my inexperience with writing scripts. I am mostly a copy - cut - paste scripter.

 

I have an extension panel for my users in Photoshop that has buttons for menu items and tools. I also have two buttons that run scripts that were complied from Actions scripts. What I have learned is that these buttons on the extension panel do not work if the two action scripts are not loaded into the Action panel.

 

What I would like to have happen is for the scripts to run without having to have them loaded into the Actions panel. Below is what I have in my hotscript.jsx file for one of the Actions. How would I code this so it does not require the scripts to be loaded into the Actions panel?

 

function selShade()
{var idPly = charIDToTypeID( "Ply " );    var desc3 = new ActionDescriptor();    var idnull = charIDToTypeID( "null" );        var ref2 = new ActionReference();        var idActn = charIDToTypeID( "Actn" );        ref2.putName( idActn, "Shade" );        var idASet = charIDToTypeID( "ASet" );        ref2.putName( idASet, "Shade" );    desc3.putReference( idnull, ref2 );
executeAction( idPly, desc3, DialogModes.NO );
}

 

The Second script is this:

function selCreatepdf()
{var idPly = charIDToTypeID( "Ply " );    var desc14 = new ActionDescriptor();    var idnull = charIDToTypeID( "null" );        var ref6 = new ActionReference();        var idActn = charIDToTypeID( "Actn" );        ref6.putName( idActn, "Before After Presentation" );        var idASet = charIDToTypeID( "ASet" );        ref6.putName( idASet, "Before After PDF" );    desc14.putReference( idnull, ref6 );
executeAction( idPly, desc14, DialogModes.NO );
}

 

I hope this is possible because it would eliminate my users having to load Actions into the Actions panel.

 

Thanks in Advance for your help - Sam


Viewing all articles
Browse latest Browse all 12244

Trending Articles



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