0

I am working on a Javascript that searches for certain "paragraph styles" inside InDesign, the way I want to accomplish that is by creating an array of 'paragraph styles' which are selected in the 'paragraph styles panel', is there a way I can reference all the selected Styles inside the UI of a Panel?

P H
  • 35
  • 11
  • 1
    Before you do any scripting, it looks like you are trying to do something which is already in InDesign or your question is unclear. Are you trying to generate a paragraph style through the script? Paragraph styles are an array already, do you need a separate group? It also helps if you post what you tried so far. – Nicolai Kant Dec 11 '15 at 21:01
  • I want to move the paragraphs with 'certain' styles to separate layers, I did already the script by searching for styles starting with certain prefix name, but it would be much more convenient to do it via style selection – P H Dec 13 '15 at 14:56

4 Answers4

2

However a raw answer is NO. UI panel's selections are not scriptable (doesnt exist in Object Model)

Cashmirek
  • 269
  • 1
  • 9
0

I am still not sure what are you trying to do, but provided you have CC 2014 and up you will need to look at Adobe CEP. This uses node.js/io.js to build custom pallets. Here is a link:

https://github.com/Adobe-CEP/CEP-Resources/wiki/CEP-6-HTML-Extension-Cookbook-for-CC-2015

Nicolai Kant
  • 1,391
  • 1
  • 9
  • 23
0

I confirm. I did some experimentations thinking that we can get something out of the selection we could introspect (i.e. copying selected links to a location for example). However any of the attemps i explored thrown a dialog. So it's not a way to go. Probably the only solution is low level code. Unless I am wrong. Loic

Loic
  • 2,173
  • 10
  • 13
-1

app.activeDocument.paragraphStyles this will give all the paragraphstyles in the document through indesign script(.jsx).get it using csinterface.evalscript()