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
- 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.
- On the menu bar, go to Project > Variables... this opens the Variables dialog.
- Click Add New
- 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)
- 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.
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.