Warning: if you are a power user of Adobe Captivate, this article is not meant for you at all! It is aimed at absolute starters and will be followed by "Unleash the power of variables using advanced actions"
1. Goal
By means of practical examples I would like to explain the meaning and importance of variables in Captivate. Although screenshots will be from Captivate 5, most examples can be used in Captivate 4 as well and where possible I will explain the different workflow in that case.
For CP4 users do recommend a posting from Manish Anand in the Captivate blog:
Break Ice with Variables
2. What is a variable?
If you 'google' to find a definition of a variable you will get thousands of results. I would say that it is a container with a name and the content can change or be changed (is variable). If this sounds confusing, please open up a (blank) Captivate file and try this example out. You will use an existing variable, a system variable:
- Open File, Project Info (in CP5) or File, Document Info (in CP4).
- Type your name in the field 'Author'.
- Get back to the stage. Create a Text Caption with this text 'My name is $$cpInfoAuthor$$'. The word enclosed in the $$ signs is a variable. Recommend a good practice; do no type the word with the $$ signs, but choose it from a list that you can open with an X button. You can find this button for CP4 in the formatting toolbar (stage or Text Caption dialog box) and for CP5 in the Format region of the Properties panel (Text Caption).
- Preview your project and watch the Text Caption: the variable (placeholder) $$cpInfoAuthor$$ will be replaced by its actual value (your name as Author). If you change this author’s name, you change the content of the variable and the new content will be in the Text Caption when previewing or after publishing.
3. Types of variables
System variables are available in Captivate, you do not have to create them. Some can only be used to display their content, but others can be changed/controlled. You can find a complete list of the available system variables:
User variables are customized variables created by you. Some examples :
- to store he name of the user who is watching your tutorial
- to use as a counter to keep track of the views of a certain slide
4. Creating a user variable
You can create variables using Project, Variables (CP5) which will be Project, Actions, tab Variables (in CP4). In this dialog box you have all the functionalities available: add, update, remove variables. I would suggest some tips:
- Never start user variables with the character “c” or “r”; the system variables all start with c (for the cp variables) or r (for rd variables; rd is the abbreviation of RoboDemo, previous name of Captivate long time ago) and in some dropdown lists system and user variables are mixed and presented in alphabetical order. In the examples you will see that names of user variables start with ‘v_’ in my case.
- User variables are case sensitive. That is why I recommend chosing variables from a list, not typing them when you insert them in a Text Caption.
- Create descriptive names if possible, use similar names for similar variables (makes it easier when having to use them in advanced actions).
- It is not always necessary to give a value to the variable when creating it, only when you need an initial value. For the examples in the screenshot I only gave a value=0 to the user variable v_counter.
- Adding a description is not necessary but can prove very useful later on for yourself or co-authors.

However it is not always necessary to create variables before using them. Some examples:
- If you need the variable to store the content entered by the user in a Text Entry Box, you can create this variable using the Properties panel, region General next to Var Associated. Click on the button with the X (highlighted in green) and you can define and associate the variable in one step (see screenshot - you can also find a demo on Timesaving tip). Sorry, CP4-users this is a new feature for CP5.
- When creating Advanced actions, you can easily switch to the Variables dialog box with a button in the Advanced actions dialog box. I will show this in the next article about variables. This is also feasible in CP4; both Actions and Variables are in a tabbed dialog box in CP4.

5. Showing variables in a movie
If you practiced the example in "2. What is a variable" you already know how to insert a variable in a Text Caption. Would like to offer some tips and present a few useful examples.
Tips
- Sorry for the repetition: do not type the variable with the enclosing $$, but use the dropdown list that you can get with the X-button (see ‘What is a variable’); principal reason is the case sensitivity of variables
- Default size for the variable in the Text Caption is 15 characters. If the content of the variable has more characters, they will be truncated! When inserting the variable you can change this default number as I did for this system variable in the screenshot (highlighted in blue). For CP4: dialog box is similar, button 'Variables' is replaced by the button 'Actions'.
- When inserting a variable, you can filter the (large) list by chosing a category for system variables. In the screenshot I filtered on the category "Movie Metadata" (highlighted in yellow).
Examples
For CP5-users only: use Text Captions with inserted System variables on Master slides, some ideas:
- Movie Metadata variables such as cpInfoAuthor, cpInfoProjectName, cpInfoCompany; this is not very spectacular because those are static variables (do not change) but it can save time.
- Movie Information variables such as cpInfoCurrentSlide, cpInfoCurrentSlideLabel, rdInfoSlideCount. Want an exercise? Try to realize this footer:

- Want to make the user nervous? Then try to insert the Movie Information variable cpInfoElapsedTimeMS in a text caption. This can be an interesting variable, but I should change its 'tempo' to seconds or minutes instead of milliseconds. To achieve this change you do need an Advanced action, be patient until the second article about variables.
For CP4-users: all examples up to here can be realized by creating the text caption on the first slide and showing it for the rest of the project. The next example (my favourite) is somewhat more complicated, because you will have to copy/paste to all Question slides.
- Quizzing variables: I use to create a dedicated Master slide for Question slides. Look at the screenshot (runtime) please. Here I used the variable cpQuizInfoTotalProjectPoints (static variable in the blue rectangle) and the variables cpQuizInfoPointsPerQuestionSlide and cpQuizInfoPointsScored, both in a rollover caption

- to count the number of times a specific slide has been visited, you can add as action on Enter of the slide: increment v_counter. This user variable has to be created (see 5) and its starting value should be set to 0. You can insert this user variable to a Text caption on the slide.
6. Changing/controlling variables
Showing user or text variables can be useful but being able to control the movie by changing variables is still better, don’t you agree? The last example in 5 let you change a user variable. The real power of control needs the use of advanced actions, but as promised in this first article I will not use those actions. Here are some ideas:
- You can turn on/off the playbar, p.e. on Question slides to make user navigation impossible. The visibility of the playbar is controlled by the system variable cpCmndShowPlaybar. This variable has the value = 1 if the playbar is visible and the value = 0 if the playbar is hidden. To hide the playbar on the first Question slide, attach an action on Entering this slide like you can see on the screenshot. On exiting the last Question slide, you can attach a similar action, to turn the playbar on again (Assign value=1).

- Pretty similar: if you use the TOC and enabled navigation by TOC for the user, you can temporarily lock the TOC during a Quiz. The system variable in control is cpLockTOC. If you want to lock it, assign the value 1 to this variable, to allow navigation again, assign the value 0.
- You have Audio in your project, but are not using a playbar (that has a mute button)? You can create your own buttons to turn off Audio and to turn on Audio (for a single toggle button, you need an Advanced action - I blogged about it in Toggle-tip). For the OFF-button: on Success, assign the value 0 to the system variable cpCmndMute. For the OFF-button: on Success, assign the value 1 to the system variable cpCmndMute.
If you try those examples, you will see that only the three system variables mentioned appear in the list for assignment as possible actions for entering/exiting slides (same list as success actions for buttons or click boxes). You need to create an Advanced action to change the value of other system variables (will be treated in second article).
User variables can be populated using a Text Entry Box (see 4. Creating user variables). Of course you could also use the action 'Assign' to give a value to a user variable. The actions 'Increment' and 'Decrement' can be very useful for user variables like the v_counter I described earlier.
Hope that this article could give you some ideas about the user of variables. In the next article about variables I will try to explain some advanced actions to control movies with variables.