Copy link to clipboard
Copied
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."
Maybe 'ComandBar' is not the name of your panel, you can use this script to get the list of name to all the panels from Photoshop:
...
function getPanelsList(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var applicationDesc = executeActionGet(ref);
var panelList = applicationDesc.getList(stringIDToTypeID('panelList'));
var pL = "PanelList:\n"
for (var m = 0; m < panelList.count; m++) {
var thisPanelD
Copy link to clipboard
Copied
What kind of a Panel is "CommandBar" supposed to be?
I build the panel with configuration
Did you mean you built it with Configurator?
Which Photoshop version do you use?
Copy link to clipboard
Copied
yes i meant to say i built it with Configurator and i am using cs6
Copy link to clipboard
Copied
Maybe 'ComandBar' is not the name of your panel, you can use this script to get the list of name to all the panels from Photoshop:
function getPanelsList(){
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var applicationDesc = executeActionGet(ref);
var panelList = applicationDesc.getList(stringIDToTypeID('panelList'));
var pL = "PanelList:\n"
for (var m = 0; m < panelList.count; m++) {
var thisPanelDesc = panelList.getObjectValue(m);
pL += (thisPanelDesc.getString(stringIDToTypeID("name")) + "\n");
}
alert(pL);
}
getPanelsList();
and than you will see if your panel can be accessed by script or not, and with what name.
Copy link to clipboard
Copied
Great Thank You for your Help!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more