Phantom is an interpreted language
created to automate tasks in Microsoft Windows 32 Bit Operating Systems.
The Phantom system is broken into three primary parts:the interpreter,
the script, and the window declarations. Under most circumstances, these
three are required to perform actions on a window. The following topics
discuss the features and capabilities of the Phantom system.
What is Phantom?
New in Phantom v2.0
Phantom version 2.0 contains many new features beyond Phantom version
1.1. The entire interpreter was redesigned from the ground up to provide
a better script development environment. Many of the syntax limitations
of v1.1 are completely gone in version 2.0. Scripts are more robust
and can be much more flexible than scripts for version 1.1.
Below is a summary of new features for Phantom v2.0:
New Variable Types
Phantom v2.0 supports new variable types. Data types such as bitmaps,
option sets, registration keys, and more can be accessed through new
variable types. See variables for more information.
A whole suite of new functions are available in version 2.0. New window
functions as well as new general
functions allow for more control and options for automation. Additionally,
future extensions can be loaded using the function package
New keywords were added to Phantom version
2.0. The new keywords allow greater control of the state of a script,
including the manual removal of previously declared variables and functions.
Phantom errors, warnings, and failures can now be handled using the
try-catch statements. Additionally, scripts
can create and throw user-defined exceptions using the new exception
Variables can now be in multi-dimensional arrays
Phantom now has a console mode. Phantom commands
can by typed directly into a console to be executed real time. This
is great for experimenting with new Phantom commands.
Phantom Target Application
Phantom Target, included with the Phantom
Interpreter, is a an application containing many window types supported
by Phantom. It is provided for use with the many samples included in
this documentation, as well as for trying Phantom commands before integrating
them with automation scripts.
Using the new bitmap data type and the
CaptureBitmap function, individual
windows can have their bitmaps captured and saved to a file. Bitmaps
can also be loaded from files and compared to other bitmaps.
Phantom scripts can be run directly from within another script by using
the include keyword. The scripts are run as
though they were a part of the calling script. Useful for creating script
pre and post processors, declaring global variable sets, and including
common user defined function sets.
Future function sets can be added directly and seamlessly to Phantom,
without the need to re-install.
The scope of variable declarations is different in Phantom version 2.0.
Variables declared in functions and in flow control statements are not
available outside those statements (or outside their 'scope'). This
is more in line with C and other common programming languages. See General
Language Syntax for mode information.