Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need Boilerplate Floating Panel Script

New Here ,
Sep 27, 2022 Sep 27, 2022

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!

TOPICS
Scripting , SDK
247
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 27, 2022 Sep 27, 2022

You need a ScriptUI panel. See here for examples:

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 29, 2022 Sep 29, 2022
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 27, 2022 Sep 27, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines