Join Keith Gilbert for an in-depth discussion in this video Decision making and looping, part of InDesign: Scripting Made Easy.
- Sometimes, you will need a way to include…decision-making or looping in a script.…This is where something called a control structure…come in handy.…We're going to look at five useful control structures.…First, we'll look at what are called if-else statements.…Next, we'll look at for loops.…Third, we'll check out something called…a try-catch statement.…Next, we'll look at switch statements.…And we'll conclude by looking at…a do-while loop.…
I've listed these here in what I would anticipate…is the order of frequency of use.…In other words,…I think you'll encounter the if-else statement…and the for loop really quite frequently in your scripts…and you'll use the switch statement…and the do-while loop probably less frequently,…at least based on my experience.…Let's look at examples of each of these in use.…In InDesign, you're going to want to open…the file called Control_Structures.indd…and there in your scripts panel,…flip open the 04_03 folder.…
We're going to try each of these five scripts…that are listed here…and see what they do…
- What are InDesign scripts?
- Installing scripts
- Editing scripts
- Referencing InDesign objects in scripts
- Creating a script to set preferences
- Creating a script to watermark designs
- Creating a script to transpose characters
Skill Level Beginner
InDesign CC 2013 Essential Trainingwith David Blatner9h 31m Beginner
InDesign CC 2014: EPUBswith Anne-Marie Concepción4h 50m Beginner
InDesign: Layout and Compositionwith Nigel French1h 27m Appropriate for all
Word and InDesign: Integrationwith Anne-Marie Concepción3h 30m Intermediate
1. Get Started
2. Find and Install Scripts
3. Edit a Script
5. Reference InDesign Objects with a Script
6. Create a Script to Configure Preferences and Defaults
7. Create a Script to Add Document Watermarks
8. Create a Script to Transpose Two Characters
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.