Variable Restore

 

The Variable Restore command used in conjunction with the Variable Save command is the key to passing variables between independently running macros.

 

 

Script Editor > Expand Variables Category > Variable Restore

 

 

Used with the Variable Save command, variables can be passed quite easily from one macro to the next on independent running of macros. Where one macro saves out the variables to memory, the next macro can restore variable values used in the first macro.

 

The Variable Restore command restores values of variables from system memory. Select to restore all variables or a specific variable type, such as Text String, Control, Integer, etc.

 

 

Example

At the end of the Macro A script, insert a Variable Save command to save all variable values to memory.

 

At the beginning of the Macro B script, insert a Variable Restore command. This utilizes the values of the variables created in Macro A in Macro B.

 

 

Note 1: Upon closing the Macro Express Player or rebooting Windows, the values of the variables saved to memory are lost.

 

Note 2: Only Global variables may be restored. Local variables are not saved with the Variable Save command and therefore cannot be restored.