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

[script] "if exists script" function

$
0
0

Hello,

 

Is exists a function in javascript to verify if a script named X exists ?

 

I want to check it, and if it exists, launch it :

 

function executeScript(scriptName)
{    if (scriptExists(scriptName))   {        var desc = new ActionDescriptor();            desc.putString( idjsNm, scriptName );        executeAction( idAdobeScriptAutomationScripts, desc, DialogModes.NO );   }
}

function scriptExists(scriptName)
{
    //    // Verify if script named 'scriptName' exists, if true, return true, else return false    //   return false;
}

Viewing all articles
Browse latest Browse all 12244

Trending Articles