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

Script to open a panel Error Message

$
0
0

so i have this code that opens a panel with a script which i have given a hotkey. As i would like a hotkey for my panel, but the problem i am having is that it does not work with my panel only with others, I build the panel with configuration and need some help debugging.

 

//////////////////////////////////////////////////////////////This is the Script for the code

#target photoshop

openPanel('CommandBar');

 

 

function openPanel(Name)

{

    var desc1 = new ActionDescriptor();

    var ref1 = new ActionReference();

    ref1.putName( charIDToTypeID('Mn  '), Name);

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

    try

  {

    executeAction( charIDToTypeID('slct'), desc1, DialogModes.NO );

    }

  catch(e)

  {

  alert(e.message);

  }

};

//////////////////////////////////////////////////////////////////////////

 

error dialog when running with my panel: "- The object “menu item “CommandBar”” is not currently available."


Viewing all articles
Browse latest Browse all 12244

Trending Articles