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

What's the best book on scripting?

Community Beginner ,
Jun 24, 2020 Jun 24, 2020

Copy link to clipboard

Copied

After first using a script (yay) to convert 239 paragraph numbers to Hyperlink Text Anchors, I then had to manually go through and search out each referernce to those room numbers and create a hyperlink to one of said anchors. Probably 500 or more links, as there were 1-4 per paragraph.

 

Wow. I mean, "This looks like a job for . . . Scripting!" 

 

But while I can write out the flowchart for what I want to do, I can't code it. Time to learn.

 

What are some of the best resources for learning InDesign scripting out there? I have a second book that I  have to lay out and edit (well, in reverse order) and having this automated when it comes time to finalize that one would be brilliant.

 

 

(For what it's worth:

 

What I need it to do is to
1. Ask me how many paragraphs to look for
2. Start at the beginning of the book. Look for 001 in a certain style
3. If you find it and it's not already linked, look up 001 on the Text Anchor List, and put in that link (bascially link it back to the room number)
4. Keep going until the end of the book
5. Now look for 002 . . .
6. Repeat until last number
The list of text anchors already exists (that's the script I mentioned above: it works)

TOPICS
How to , Scripting , Type

Views

406

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

Contributor , Jun 25, 2020 Jun 25, 2020
Community Expert ,
Jun 24, 2020 Jun 24, 2020

Copy link to clipboard

Copied

Short answer is there's no definitive book. I think most seasoned InDesign scripters will tell you they learned by reviewing the InDesign scripting reference, the InDesign DOM, and sample code, while also learning the fundamentals of JavaScript. 

 

Peter Kahrel's ScriptUI for Dummies is good if you want to understand how user interfaces work. 

 

It takes a lot of trial and error to learn. Sounds like you have a pretty good idea of what you want to accomplish: the best way to learn is to try. It'll break a lot but it gets easier with time. 

 

If you don't have the fundamentals of JavaScript down, I would start there: variables, conditions, loops. Then start with a Hello World. 

 

alert("Hello document: " + app.activeDocument.name);

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 24, 2020 Jun 24, 2020

Copy link to clipboard

Copied

Have a look at the following discussion as well, where we touch upon some key resources helpful for scripting

https://community.adobe.com/t5/indesign/adobe-indesign-scripting-language-reference/td-p/11222430

 

-Manan

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 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

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 Beginner ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

LATEST

I've marked this "correct" because it's just what I want. A published book (and I picked up GREP for InDesign as well) that hits JavaScript AND its utility for InDesign specifically. The other resources above are ALSO correct . . . but this hits my sweet spot.

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