Skip to main content
Aprking
Inspiring
June 2, 2024
Answered

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

  • June 2, 2024
  • 2 replies
  • 865 views

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

This topic has been closed for replies.
Correct answer Robert at ID-Tasker

Only by accessing configuration workspace files. 

 

2 replies

leo.r
Community Expert
Community Expert
June 2, 2024

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.

Robert at ID-Tasker
Legend
June 2, 2024

@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... 

 

leo.r
Community Expert
Community Expert
June 2, 2024
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...

 

 

Robert at ID-Tasker
Robert at ID-TaskerCorrect answer
Legend
June 2, 2024

Only by accessing configuration workspace files.