User Guide > Working with objects and properties > Types of objects > Variables and Expressions > Variables

Autoplay Menu Designer provides several ways to program complex behavior of your application. One of the available tools here is variables. Variables are named “containers” for certain values – numeric, textual and others. The term “variable” reflects the major feature of such containers – the value they store can change or be changed.


Variables let you control the flow of execution of your application, provide different reaction of the application to user’s actions, check if given conditions are met, modify properties of objects of your application and many more.


Important: variables are not supported in Web Applications! For more information, see Web application limitations.


All variables can hold values of three types:

String value is any set of symbols enclosed to quotes. “Hello, world!”, “ABC123”, “C:\Windows\System32” or “#nf8$%dmss” are all strings.
Numeric value is any number, either integer or fractional. Examples are 654, 4e2 or 0.6745.
Boolean values are either True or False. For example, an image is either visible (True) or not (False).


There are three kinds of variables in Autoplay Menu Designer:


User variables. Custom variables added by a user to an object, such as a window, a page or a group of objects. User variables can hold any values assigned to them. The number of variables is unlimited, so you can create as many custom variables of arbitrary types as the task requires.


User variables can be assigned to most objects, but we recommend assign variables to an object lying one level higher in the object hierarchy than the objects it will refer to or manipulate with. For instance, if you want to use a variable to modify or control elements on a page, you should add the object to that page. If a variable is to control the behavior of pages, add it to the parent window and so on.


Internal variables. Objects have variables too. The internal object variables influence the behavior or appearance of the object, and can be used in expressions just like user variables. Typical example is the Visible Boolean variable that determines whether or not the object is shown on the screen. Other examples are Text variable of the Button object or the Edit Box object – it sets the displayed text of these controls, and CurPageName of the Window object that determines which page is currently shown.


You can modify values of internal variables to hide or show objects, alter their captions or text, or otherwise use them to program the operational logic of your application.


Registry variables. The variables directly linked to certain keys in the Windows registry. You can use such variables to read registry key values or to modify them. For instance, you can place your executable into the autorun section of the registry, or check if Adobe Reader is already installed and show the Install Adobe Reader button if it is not.


Variables can save data between runs of your application, can store user input or serve as a trigger for actions. For instance, you can ask a user for password and unlock certain parts of the application only if the correct password is provided. Other examples are loading different media files depending on user’s choice or displaying different pages of the application if different options were selected. You can even use registry variables to set up interaction between applications.