Join Keith Gilbert for an in-depth discussion in this video Variables, part of InDesign: Scripting Made Easy.
- Almost every script you write…will contain one or more variables.…So it's important to understand what they are…and how to use them.…A variable is a way to store and…manipulate data in a script.…To see how this works, open the "Rule every 5 rows" script…in the ExtendScript Toolkit,…and you'll see that sprinkled throughout…this script are a number of variables.…The variables are declared by typing in "var," space,…and then the name of the variable.…
So here I've got "var mySelection"…or "var numRows".…Those are variable declarations,…We're saying "I want a variable called numRows"…or "I want a variable called mySelection".…And, again, variables are just a way to store data…and then manipulate that data in a script.…Variable names are case-sensitive,…but they can be absolutely anything you want…as long as they aren't reserved words.…It's somewhat of a convention among some scripters…to name variables starting with the word, "my",…so, like "mySelection" or "myNumbers".…
The reason for that is sometimes just so that…
- 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.