This content has been marked as final. Show 6 replies
You could store it in the document's label. But the person on the receiving end would then have to know how to get that script out of the label and installed as a script. [Maybe there is a script to extract a script from a label and run it?]
why not to place script's code as contents of TextFrame on pasteboard with info where to save ? ;)
You can embed a script in any object that either a.) has a label property, or b.) supports the insertLabel/extractLabel methods. Running the script is as simple as extracting the label and feeding it to the app.doScript method. Somewhere around here I have an example of a menu item eventListener that adds menu items defined in an embedded script to the Layout context menu when the page item is selected....
Thanks for the info.
I was looking for something that I could run directly - I think that the idea of embedding the script in a label and using app.doScript will be the way forwards.
> I was looking for something that I could run directly - I think that the idea of embedding the script in a label and using app.doScript will be the way forwards.
If you need even more automation than that, you should check out the
APID ToolAssistant from Rorohiko. You can embed a script in a doc and
have it run itself completely automatically (on doc loading, and any
other of a multitude of events...)
I highly recommend it (and I have no interest in the company).
It's a long-back discussion, is there any updated suggestion/method available to embed the scripts within the InDesign templates? So that user can access those script and run the same whenever it's required.