Skip to main content
Mike Witherell
Community Expert
Community Expert
January 19, 2024
Question

Script to show panels

  • January 19, 2024
  • 4 replies
  • 556 views

Hi gang,

I cannot find a script that shows specific panels in the dock. Does anyone have an example of script that shows/calls forth a named panel into the dock? Or even a script line that calls forth into view a panel in the middle of the screen floating free?

This topic has been closed for replies.

4 replies

Mike Witherell
Community Expert
Community Expert
January 20, 2024

Hi Robert and Rob,

Thanks for the assist. Rob, your script works for showing one panel, but when I duplicated it by 14 panels I wanted to show, it didn't work. I'm trying to show 14 of my favorite every-day panels, make them show up in a dock, and have it save the workspace as "IDclass".

Mike Witherell
Robert at ID-Tasker
Legend
January 20, 2024

This doesn't work?

 

Mike Witherell
Community Expert
Community Expert
January 20, 2024

Similarly, this did not work:

// Check if InDesign is running
if (app && app.name === "Adobe InDesign") {
  // Invoke the Info panel
  app.menuActions.itemByID(208).invoke(); // ID 208 corresponds to the Info panel
} else {
  alert("Adobe InDesign is not running.");
}
Mike Witherell
Participating Frequently
January 20, 2024

If it helps, this works in AppleScript.

 

tell application id "com.adobe.InDesign"

   activate

   set visible of panel "Info" to true

end tell

 

Robert at ID-Tasker
Legend
January 20, 2024

@Mike Witherell 

 

As @Nick Passmore suggested - you need to refer to Panels collection - not menu:

 

var myPanel = app.panels.item("$ID/Info Panel");

 

myPanel.visible = true;

 

Mike Witherell
Community Expert
Community Expert
January 20, 2024

I tried this but it did not work:

 

// Check if InDesign is running
if (app && app.name === "Adobe InDesign") {
  // Invoke the Info panel
  app.scriptMenuActions.item("$ID/Info Panel").invoke();
} else {
  alert("Adobe InDesign is not running.");
}

 

Mike Witherell
Robert at ID-Tasker
Legend
January 19, 2024

Maybe through invoke()?