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

How to Get the Size and Position of All Visible Panels in InDesign

Contributor ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

Hello everyone,

 

I'm currently working on an ExtendScript for Adobe InDesign and need to programmatically retrieve the size and position of all visible panels. Despite my efforts, I haven't been able to find a straightforward way to access this information through the InDesign scripting API.

 

Here's what I've tried so far:

 

  • Attempted to use app.panels to get panel objects, but couldn't find attributes for size and position.
  • Looked into window and bounds properties but couldn't apply them directly to panels.

 

Does anyone know how to access the size and position of visible panels, or if there's an alternative method or workaround to achieve this?

 

Any guidance or examples would be greatly appreciated!

 

Thank you in advance for your help.

 

Best regards,

Aprking

TOPICS
Scripting

Views

313

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Jun 02, 2024 Jun 02, 2024

Only by accessing configuration workspace files. 

 

Votes

Translate

Translate
Community Expert ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

Only by accessing configuration workspace files. 

 

Votes

Translate

Translate

Report

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 ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

In addition to @Robert at ID-Tasker's suggestion, you may be able to take a screenshot of your screen and let an image recognition AI framework analyze the screenshot and detect the panels for you. I have no idea what it takes and if it's worth the effort but I have no doubt that it's feasible.

Votes

Translate

Translate

Report

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 ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

@leo.r

 

Even if AI can get you positions - there is no way to "move" them back there - the only way is by reading and modifying workspace files...

 

... but I think there is still one problem - not sure if you can just switch workspaces - if you don't have to restart InDesign as well - which is rather impossible using JS alone... 

 

Votes

Translate

Translate

Report

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 ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

quote

@leo.r

 

Even if AI can get you positions - there is no way to "move" them back there...


By @Robert at ID-Tasker

 

Oh yeah for sure AI won't be able to move them. It's just @Aprking was only interested in retrieving their positions...

 

 

Votes

Translate

Translate

Report

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 ,
Jun 02, 2024 Jun 02, 2024

Copy link to clipboard

Copied

@leo.r

 

I'm pretty sure ability to recreate it later is the end goal - otherwise, I don't see the point? 

 

You can't "click" things on the panels - not from the JS anyway - but some of the functionality can be achieved through invoke(). 

 

So @Aprking - what is your end goal?

 

Votes

Translate

Translate

Report

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
Contributor ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

My idea is to use scripting to quickly switch between different panel positions and sizes. The solution provided by @Robert at ID-Tasker could partially address this issue, but scripting might be more flexible and faster. However, I feel that scripts may not be able to obtain this information

Thank you for your help.

Votes

Translate

Translate

Report

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 ,
Jun 03, 2024 Jun 03, 2024

Copy link to clipboard

Copied

LATEST

@Aprking

 

Scripting won't give you this info.

 

Or you can use Workspaces. 

 

Votes

Translate

Translate

Report

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