How can I close my custom panel extension by script?
Every menu item has a close command and a toogle command.
For example, I can first close the Actions menuItem to toggle it after.
This make sure the panel is visible (even if it is closed or not in first place)
app.runMenuItem (stringIDToTypeID('closeActionsPanel'));
app.runMenuItem (stringIDToTypeID ("toggleActionsPalette"));
But, I have created my own custom Extension (for example, its name is "xxxx")
and I want the same behavior, I can't.
I can only toogle it ( on/off ) and it does not make sure the user remains with my extension visible.
This the only way of refreshing my panel extension (???).
Where is the stringIDToTypeID ("????????") to close my custom extension?
var myExtensionName = "XXXX";
var desc = new ActionDescriptor ();
var ref = new ActionReference ();
ref.putEnumerated (stringIDToTypeID ("menuItemClass"), stringIDToTypeID ("menuItemType"), stringIDToTypeID("extension"));
desc.putReference (stringIDToTypeID ("target"), ref);
var ref1 = new ActionReference();
ref1.putName( charIDToTypeID('Mn '), myExtensionName);
desc.putReference( charIDToTypeID('null'), ref1 );
try {
var ddd = executeActionGet(desc).hasKey( ??????????????????? ); // close my custom panel extension
} catch(e) { $.writeln(e) }
// "select" toogles my custom extention: ON if OFF || OFF if ON
var descXX = executeAction (stringIDToTypeID ("select"), desc, DialogModes.NO);
