Skip to main content
Participant
September 27, 2022
Question

Need Boilerplate Floating Panel Script

  • September 27, 2022
  • 2 replies
  • 321 views

Greetings, I am trying to locate a basic example of a floating panel implemented via extend script. Is there a way to create a functional InDesign floating panel using JavaScript? Any help or sample script would be much appreciated!

This topic has been closed for replies.

2 replies

Community Expert
September 28, 2022

You could use the following website to create your panel by drag/drop and autogenerate the code. This seems interesting

https://scriptui.joonas.me

-Manan

-Manan
Peter Kahrel
Community Expert
Community Expert
September 27, 2022

You need a ScriptUI panel. See here for examples:

https://creativepro.com/files/kahrel/indesign/scriptui.html

Participant
September 29, 2022

Thanks Peter, I did already check out that resource. The panels in this context seem to work more like modeless dialog windows than actual InDesign panels. They do float and allow you to work with the InDesign document while they are open, but also have the following issues:

 

a) Window opens multiple times (unlike InDesign Panels, which have a single instance that can hide/show). Trying to mimic this behavor.

 

b) The focus remains on the panel window. For example, if I've clicked on the window it activates (like a dialog), but then InDesign short keys don't work (Cmd-O to open a document, for example) because apparently these keystrokes are directed to that (active) window.

 

c) They don't look exactly like InDesign floating panels. This is a nice to have, not a requirement.

 

Any suggestions or sample code would be appreciated.