Contents
VBA Script Player Contents

This help file contains a list of all Help topics available for the application.  You can use the scroll bar to see the entries that are not currently visible in the Help window.

For information on how to use Help, press F1 or choose Using Help from the Help menu.

Overview		Troubleshooting
Menus

File

Run

Options

Help


Overview

The VBA Script Player (VSP) allows you to run or debug scripts that have been created using the Cham 4.5 Script Type or the VBA Script Type.

You can also open the VBA Script player from a command line.  For additional information, see Command Line Options.


File

Open...

Exit


Run

Go

End

ReStart

Step Into

Step Over

Toggle Breakpoint

Clear All Breakpoints

Add Watch


Options

Animate


Help

Contents

About VBA Script Player..


Open
Open...

Opens an existing Script file.  Some sample script files are provided for you.

Note:	The VSPVBA application is able to recognize the Script Type by the contents of the file, regardless of the script file extension.


Exit

Exit allows you to exit from the VBA Script Player application.


End

Stops the execution of the script.


Go

Runs the open script in Debug mode.  If you want to run the script in slow motion, choose the Animate command from the Options menu. The script will be executed with the specified timing interval between steps or procedures.

If you have stopped debugging, you can choose this command to resume the execution of the script.


Restart

You can restart the execution of the script file when it is in Debug mode by choosing this command.

•	If you are using Step Into, you can use the End command to stop the execution after a particular command line.  You can then continue by choosing Restart again.

•	If you are using the Step Over option, you can use the End command to stop the execution after a particular procedure.  You can then continue by choosing Restart.


Step Into

Allows you to execute the next executable line of code in the application. The amount of time between steps can be specified by choosing the Animate command from the Options menu.


Procedure Step
Step Over

Allows you to execute the application a single procedure at a time for debugging purposes. The amount of time between steps can be specified by choosing the Animate command from the Options menu.


Toggle Breakpoint

Allows you to set breakpoints and toggle between inserting and removing them.  You can select the position of the breakpoint by placing the cursor in the desired location.  A breakpoint cannot be set in a non-executable line.  If you have set a breakpoint, and select Toggle Breakpoint, the breakpoint is removed.  To clear all breakpoints, use the Clear All Breakpoints option.


Clear All Breakpoints

Choose this option to remove all breakpoints.


Add Watch

Choosing this option (or Shift + F9) displays a watch screen that lets you track the value of  a variable.

To see the current value of a variable, either  type the variable name in the Variable to Watch field of the Watch Screen or place the cursor within the variable and choose the Add Watch button.  The current value of the variable appears in the Current Value box. As the script runs, the current value is constantly updated.

Note:	An empty string may be valid within the script.

To watch more than one variable:

1.	Put the variable in the Variable to Watch box.

2.	Choose the Add Watch button.  This moves the value to the Currently Watching list box.

Note:  	If the variable is unknown, the Add Watch button is disabled.

3.	Repeat this procedure for each variable you want to watch.  The list of watched values is saved automatically for each session.

To remove a variable from the list, highlight the variable and choose the Remove button.  To remove all variables, choose the Remove All button.

To view long strings:

1.	Add the string  to the Currently Watching list box.

2.	Highlight it in the list box.  This moves it to the Current Value box where you can scroll left or right through the string.

Chose the Close button to end this session.


Animate

Choose this command to execute your program in slow motion. You can set the animation speed using the Trace Speed dialog.


Contents

Using Help

To choose a Help topic:

Mouse	Point to the underlined topic you want to view and click the mouse button.

When the pointer is over an item you can choose, the pointer changes to a hand icon.

Keyboard	Press Tab to move the highlight to the underlined topic you want to view, and then press Enter.

To exit Help:

Mouse            1   Point to the File menu and click the mouse button.

2   Click the Exit command.

Keyboard          1   Press Alt.

2   Type the letter F.

3   Type the letter X.


Troubleshooting

If you experience difficulties using this application, refer to the following items:

•	Verify that installation and setup verification steps have been successfully completed.

•	Ensure that the terminal emulation can be invoked manually.

•	Ensure that terminal emulation short names are correct.


About visual script player
About VBA Script Player..

Choose the About VBA Script Player... command from the Help menu for more information about the program.

To copy this information, do the following:

1.	Choose the Copy button to copy the application version information into the Windows clipboard.

2.	You can then paste this information into any application.

3.	Choose the OK button to continue.


Command Line Options

The Visual Basic Player command line options are as follows:

Syntax : VSPVBA.exe [-n -d -p -v -e -s] [filename.vba]

Option	Description
-n	Opens the Visual Basic Player in a normal window size. If the option is omitted, the Visual Basic Player is opened minimized
-d	Opens the Visual Basic Player in Debug mode.  The Visual Basic Player's window will be in normal size. If a 'filename.vba' is specified, it will be executed
-p	Opens the Visual Basic Player in Animate mode.  The Visual Basic Player's window will be in normal size. If a 'filename.vba' is specified, it will be executed
-v	Variable predefinition
-e	Sets the active emulation (can be:Telnet,TN3270,TN5250)
-s	Sets the active session
Note:  	By default, VSP starts in a minimized (iconized) window and in Run mode.  In that case, the only menu option available is the Open dialog box.

Examples:

VSPVBA.exe script.vba

The Visual Basic Player is opened in normal mode.  It is minimized. The script is executed, and the Visual Basic Player is closed.

VSPVBA.exe -d script.vba

The Visual Basic Player is opened in Debug mode.  It is opened with a normal window size.  The script is executed, and the Visual Basic Player is not closed.

VSPVBA.exe -vName="david",Number=45 -p script.vba

The Visual Basic Player is opened in Animate mode.  The variable Name is defined as a string and set to "david".  Variable Number is defined as an integer and set to 45.  The Visual Basic Player is opened in a normal sized window.  The script is executed and the Visual Basic Player is not closed.

VSPVBA.exe -eTelnet -sAA script.vba

The active emulation is set to Telnet and the active session is set to AA. These two options should always come together in order to explicitly determine the active emulation and session.