2 people found this helpful
Sure it's possible. The simplest way to do it is to write a document label:
myDocument.insetLabel("Animal Selected", "Cow");
This can then be extracted as so:
The beauty is that document labels are stored alongside the document, so any time the user opens that document, their choices can be read.
It is also possible to store a label in the application itself -- in the same way as above.
So it's up to you to decide whether you want the user's choices to be document-specific or application-specific.
Brilliant! I will test this!
Are there any naming convention i should consider, so i don't interfere with other scripts or indesign itself?
Hi elhodel ,
there is one key word with insertLabel() you should be aware of.
And that is the string "Label".
With that you do a "Script Label" entry the user is able to see if done on a regular item on the page like a rectangle or a text frame.
Before running the snippet just select a rectangle on the page:
app.selection.insertLabel( "Label" , "Message not hidden anymore from the UI."); app.selection.label // Returns string "Message not hidden anymore from the UI."
Open the Script Label Panel to inspect the value of property "label" of the selected rectangle: