Using CpExtra Command Variables

This topic explains how to use CpExtra information variables (or info variables) to read information about Captivate and CpExtra.

Before reading this page, please make sure you have familiarized yourself with CpExtra's basic concepts.

How To Create An Information Variable

  1. Identify the information variable you wish to create. Each information variable is tied to only one name, you'll need to know that name of the information variable before you can create it.
  2. On the menu bar, go to Project > Variables... this opens the Variables dialog.
  3. Click Add New
  4. In the Name field, type the variable's name. The variable name is case sensitive. (Note: If you want the information variable to sort to the top of the variable's list, then you can put an underscore in front of its name. _xinfoEventTarget will work exactly the same as xinfoEventTarget)
  5. Click Save. The information variable has successfully been created.

You do not need to give information variables default values, they will be ignored. Information variables are never supposed to be written to. They allow you to read information about what's happening inside of CpExtra of Captivate. They do not perform actions in and of themselves, but they information they provide you can be useful to use in tandem with command variables.

Information variables should never be used to save a value.

What Kind of Information Can Info Variables Give Me?

New information variables are being added all the time.

Currently they break down into the following categories.

  • TBA

Click the links above to see specific instructions on how to use those variables.

How To Use Information Variables

Information variables give you information on the current state of the document. As such they are intended to be 'read' not 'written'. As they do not execute actions, they are most likely to be used in Advanced Actions, where the information you get from them can be checked in a Conditional Action or assigned to a command variable.

In an Advanced Action

Advanced Actions allow you to call a succession of actions, rather than just one.

This is achieved by using Advanced Actions. They are created by going to Project > Advanced Actions.

From there you can use the Assign action (or potentially even use the Expression action) to send an information variable's value into another variable.

An information variable's value might want to be read as part of the condition for a conditional action.

For more information about using Advanced Actions, check out our course about them here.

In JavaScript

You can also change Captivate Variables whenever you execute JavasScript in the Captivate course. This is commonly done through the Execute JavaScript action, which is generally available anywhere you can choose the Assign action.

To access an information variable (or any system/user variable) in Javascript, all you have to do is write out the name of the variable.

IF YOU LIKE WHAT YOU'VE READ ABOVE, THERE'S PLENTY MORE!

Join more than 2500 other Adobe Captivate users just like yourself and receive regular troubleshooting tips, illustrated tutorials, technical information, and creative solutions to real-world e-learning development issues. (See an example here.) Click the button below to join our community.  It's completely FREE!