Phantom Documentation

[Help Home] [Phantom Home]

define user_class=general_class;


user_class - The name of the application defined class.

general_class - The replacement class of the application defined class. This class must be recognizable by Phantom and should have similar properties as the 'user_class'.

The define statement allows for the automation of application defined classes.  The application defined classes must be sub-classes of already existing windows classes.  This allows the user to send general commands to the application defined class without the class being recognized by Phantom.

Generally, a class that is derived from a standard windows class but has a different class name can be automated using this statement. This can also be used on windows that have a class not defined in Phantom, but can be automated using the 'MainWin' functions.

Example Code

# Note: this code is not a stand-alone script. It is
# intended to illustrate the usage of the define
# statement.

define RICHEDIT=Edit;

# RE is of class type 'RICHEDIT' in
# the Windows declaration file.
RE.SetText(User Text);

# Another Example
define App_Class=MainWin;

# App is of class type 'App_Class' in
# the Window declarations file.
App.MoveWin(100, 100);

See Also: Window Declarations, window, Window Types

Copyright 2000-2011 Phantom Automated Solutions