Phantom Documentation

[Help Home] [Phantom Home]
Button Functions

The following functions are for use with the Button type class.  The Button type class includes graphic buttons, check boxes, and radio buttons.

            Click

The following function is implemented only for check box type Buttons.

            IsChecked

The following function is implemented only for radio type Buttons.

            IsSelected

Example Code

# Include Phantom Target Declarations
use "PhantomTarget.dec";
System("PhantomTarget.exe");

# Open the button controls
PhantomTarget._Controls.Pus_hButton.Select();

# Click some buttons
Button.Button.Click();
Button.GBUTTON.Click();
Button.OK.Click();

# Open the checkbox controls
PhantomTarget._Controls._CheckBox.Select();

# Check the check states
bool b = Check.CheckBox.IsChecked();
disp(b);
b = Check.Enabled.IsChecked();
disp(b);
Check.OK.Click();

# Open the radio controls
PhantomTarget._Controls._RadioButton.Select();

# Check the select states
b = Radio.Button[0].IsSelected();
disp(b);
b = Radio.Button[1].IsSelected();
disp(b);
b = Radio.Button[2].IsSelected();
disp(b);
Radio.OK.Click();

# Exit out
PhantomTarget.Close();



See Also: Button Class



Copyright 2000-2011 Phantom Automated Solutions