Variables

Global variables (or "built-in variables") are variables whose values are automatically set when your AutoPlay application starts. They are used to represent common values that might differ between systems. These variables are all global which means you can use them anywhere in your project.

Tip: The built-in variables are listed along with all of the actions and constants when you press Ctrl+Space in the script editor. Since all of the built-in variables start with an underscore, if you type _ and then press Ctrl+Space, you'll be taken right to the first built-in variable in the list.

The following global variables are available in AutoPlay Media Studio:

_AutoTabOrder

Controls whether the tab order for input, listbox, combobox, radiobutton, checkbox, richtext and tree objects is automatically determined by the z-order. Set this variable to false if you want to override the default tab order for input, listbox, combobox, radiobutton, checkbox, richtext and tree objects by using the page's On Key event.

_CommandLineArgs

A numerically indexed table that contains the command line arguments passed into the AutoPlay application.

_DesktopFolder

The path to the user's Desktop folder. On Windows XP/Vista or later, this is the path from the per-user profile.

_DesktopFolderCommon

The path to the user's Desktop folder. On Windows XP/Vista or later, this is the path from the All Users profile.

_DoFlashCheck

A Boolean variable used to control whether or not AutoPlay Media Studio will check for the Flash Player ActiveX control at runtime. If it is set to true (automatically set when the project contains a Flash object), the check will be performed. If it is set to false, no check will be performed. If the check is performed and the control is not found (based on the default version 6.0.0.0), AutoPlay will display a notification dialog. _DoFlashCheck can be set in Global Functions.

_IR_ProductID

This variable contains the product ID of the product from which the script was run. This allows you to identify the product being run from script.  This could be useful when making generic scripts that are used in several Indigo Rose products, but that have different things to do based on the product being run from. AutoPlay Media Studio 8 returns "AMS8".

_NoExitScriptOnPageJump

If set to true, action script in an event will continue to be executed after a Page.Jump or Page.Navigate action is called. If set to false, the execution of the action script in the event will halt after a Page.Jump or Page.Navigate is called. This variable is set to false by default.

_ProgramFilesFolder

The user's Program Files folder (typically, this is something like "C:\Program Files").

_ShowIntroVideo

A Boolean variable used to control whether the intro video will be displayed at runtime. If it is set to true (which it is by default) and the project has an intro video specified, the intro video will be shown. If it is set to false, the video will be skipped. This variable must be set either in Global Functions, or on the project's On Startup event.

_SoundInitialized

A Boolean variable that is set to true if the sound engine successfully initializes at runtime or false if it fails. (The failure to initialize is a very rare occurrence. This variable is made available for those who may require this rare feedback.)

_SourceDrive

The drive that the AutoPlay application was run from (e.g. "C:" or "D:").

_SourceFilename

The filename of the AutoPlay application (e.g. "autorun.exe").

_SourceFolder

The full path to the folder that the AutoPlay application was run from (e.g. "C:\Downloads" or "D:").

_SystemFolder

The path to the user's Windows System folder (e.g. "C:\Windows\System32" on NT based systems).

_tblErrorMessages

A table indexed by error codes containing all of the possible error messages. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found." The Application.GetLastError action is used to retrieve the last performed action's error code.

_TempFolder

The path to the user's Temp folder.

_WindowsFolder

The path to the userís Windows folder (e.g. "C:\Windows").