AutoMate™ tasks may be designed on one machine and run on others – either by exporting and importing or by deploying through AutoMate™ Enterprise Server. Because of this, sometimes it is necessary to specify a path to a file or any other piece of information that may be different from machine to machine. It is impractical to design a separate task for each machine – so AutoMate™ allows the use of Constants.
|
|
Constants can act to make tasks more portable, as they can easily convey information to the task at runtime about that users system.
You can also configure your own constants, for example UserName, favorite color, or whatever else you need to use in a centrally created task that might differ from machine to machine.
Constants, unlike Variables, are system-wide, meaning that they are not specific to single tasks. They are configured in the preferences dialog, and are specific to the machine which AutoMate™ is running on.
Constants may be used in any AutoMate™ step parameter by specifying the name of the costant sorounded by % signs as show in the example below.
Example
If Machine 1 has Windows 98 installed to
c:\WINDOWS\
and Machine 2 has Windows NT installed in
D:\WINNT\
When adding a Start an Application action you could use the AutoMate™ defined global system constant
%AMWINDIR%
in the path
When the task is deployed/imported and run on the individual machines, AutoMate™ resolves the value at runtime to the appropriate value – which in this case is the directory of Windows (without the trailing backslash).
See Also: