Wizard API

The following methods are supported by the Wizard Engine. An example of each is provided in following topics.

Given a Wizard object, creating with a statement similar to the following:

    Engine = Launch(Scope(\Code, "WizardEngine"), Self, Self,
                GetDefaultValue(FindVariable("Title", Self, 0, 1)),
                MakeBitmap(FileFind("C:\VTScada\Resources\WizVTS.jpg", 0)),
                &nextState,
                &Move,
                &Close,
                &WTitle);

Then, each of these methods would be invoked as follows:

Engine\Method(Parameters);

Error dialog

Error(
       Msg1 { First line of error message},
       Msg2{ Second line of error message},
       Msg3{ Third line of error message} 
      );

Usage: Script

Causes an error message dialog to display and cancels the current state change. Up to three lines of error message are displayed depending on the number of parameters. This is a subroutine message, pausing execution until the error message is acknowledged.

Final Check Box

FinalCheckBox(
               Value  { Initial, and returned, value for check box  },
               Msg    { Text message for check box                 },
               Enable { TRUE to enable the display of the check box }
             );

Usage: Steady State

Enables caller to define a check box for the final wizard screen, stating, "Do this when the wizard finishes".

May be used only in the at the end of the wizard process.

Force Move

ForceMove(
           MoveNow  { If valid TRUE, then trigger the state change now },
           NewState { New target state name }
          );

Initial Check Box

InitCheckBox(
              Value  { Initial, and returned, value for check box  },
              Msg    { Text message for check box                  },
              Enable { TRUE to enable the display of the check box }
            );

Usage: Steady State

Enables the caller to define a check box for the first wizard screen, saying: "Do this when the wizard starts" ...

Valid only when used at the start of the wizard.

Next Is

NextIs(
        NewState { New target state name }
       );

Usage: Steady State

Specify (change) the next state in the wizard flow. (The default is the next state in the source code file.)

No Back

NoBack(
       Inhibit { While valid & TRUE, the "Previous" button is disabled. }      );

Usage: Steady State

May be used to prevent a return to the previous state.

No Next

NoNext(
        Inhibit { While valid & TRUE, the "Next" button is disabled. }
 	);

Usage: Steady State

May be used to prevent forward progress until the operator provides information in the current state.

Skip If

SkipIf(
        Condition { If TRUE, then switch to NewTarget state },
        NewTarget { Optional target for the switch. 
                    Defaults to the next state. }
      );

Usage: Steady State

Evaluates its first parameter and, if true, causes an immediate state change to the second parameter (or the next state). Note that the current state is not added to the history (does not become the previous state).

Switch

Switch(
        Labels       { Array of short label for radio buttons   },
        Bmps         { Array of bitmap values for icons (32*32) },
        Descriptions { Array of descriptive texts 
                      (max is 4 lines each)                     },
        Destinations { Array of target state names              },
        DefaultVal   { Optional, default initial choice         },
        BottomMargin { Optional, padding to add to bottom       }
       );

Usage: Steady State

Displays a set of radio buttons and sets the next state change according to the chosen option. Explanatory text and an optional icon are displayed for each button.

Trim

Trim(
      TextString
    );

Usage: Script

A subroutine that removes leading & trailing whitespace from string, returning the result.

End Control

EndControl(
            HideOverlay { Boolean. Set TRUE to hide the overlay 
                          window while processing is underway (and 
                          display a progress bar or other indicator)
                          Set FALSE when done to restore the 
                          overlay window. },
            FinalTitle { The final title },
            FinalText  { Text to display at finish }
          );