Last active
March 16, 2021 22:07
-
-
Save MarshySwamp/895140f2867fdad69efd5aedf5a70649 to your computer and use it in GitHub Desktop.
Code Snippet: Run Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.doAction("Molten Lead","Default Actions.atn"); | |
// or | |
var actionName = "Molten Lead"; // Action to run | |
var actionSet = "Default Actions.atn"; // Action set to run | |
app.doAction(actionName,actionSet); | |
// or | |
playAction ('my action set', 'my action name') | |
function playAction(actionSet, actionName){ | |
var idPly = charIDToTypeID( "Ply " ); | |
var desc2 = new ActionDescriptor(); | |
var idnull = charIDToTypeID( "null" ); | |
var ref1 = new ActionReference(); | |
var idActn = charIDToTypeID( "Actn" ); | |
ref1.putName( idActn, actionSet ); | |
var idASet = charIDToTypeID( "ASet" ); | |
ref1.putName( idASet, actionName ); | |
desc2.putReference( idnull, ref1 ); | |
executeAction( idPly, desc2, DialogModes.NO ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment