Using PowerTerm Pro Scripts

Creating a Script, describes how to create a PowerTerm Pro script.

Editing a Script, describes how to edit an existing script.

Recording a Script, describes how to record a script in PowerTerm Pro.

Running PowerTerm Pro Scripts, describes the various ways that a script can be launched.

Running a Specific Script, describes how to run a recorded script in PowerTerm Pro to automate tasks.

Running a Script upon Startup, describes how to activate a script upon starting PowerTerm Pro.

Running Individual Script Commands, describes how to run a specific script command.

Activating a Recorded Script, describes how to activate a script recorded in memory.

Saving a Recorded Script, describes how to save a script from memory to a specific file.

 

Creating a Script

PowerTerm Pro enables you to create a script to run upon startup or at any time during a PowerTerm Pro session.

2) Specify the PowerTerm Pro folder in the Look in box in which to store the new script.

3) Type a name for the new script file in the File name box. You can type any name and extension that comply with DOS file-naming conventions.

It is recommended that you use a .PSL extension, because PowerTerm Pro automatically recognizes that the .PSL extension indicates a script file.

Scripts can be written in any standard text editor.

Editing a Script

PowerTerm Pro enables you to edit an existing script (.PSL) file.

1) From the Script menu, select Edit Script. The Edit Script dialog box is displayed:

2) Select the required script file by double-clicking the file in the files list. This opens Notepad and displays the selected script.

3) Edit the script as required.

4) From the File menu in Notepad, select Save to save your new script file.

Scripts can be written in any standard text editor.

Recording a Script

PowerTerm Pro enables you to create a script by recording all the actions that you perform in the PowerTerm Pro window. Actions can include selecting a menu option, typing an entry on the screen, making selections in a dialog box and so on.

1) From the Script menu, select Start Script Recording or click on the audio tape icon. The Start Script Recording option changes to Stop Script Recording while the audio tape icon appears pressed down.

2) Perform the manual operations that you want to record. For example, select a menu option, enter parameters in a dialog box or type a password.

If you do not want to record certain operations, click Pause Script Recording on the Script menu which changes to Continue Script Recording. This will pause the script recording process. You can then perform operations that will not be included in the recording.

3) To resume script recording, click Continue Script Recording from the Script menu.

4) When you have performed all the operations to be stored in the script, select Stop Script Recording from the Script menu.

You can also save the script file that you created, so that you can run it at any time to repeat the operations. For more information see: Saving a Recorded Script

Running PowerTerm Pro Scripts

PowerTerm Pro enables you to run scripts, upon startup or during a PowerTerm Pro session, to automate specific tasks.

Upon Startup

PowerTerm Pro enables you to run a script from startup by creating a Windows shortcut to PowerTerm Pro and a specific script file. This option can be used to connect to a host using a specific script. For more information, see Running a Script upon Startup

During a PowerTerm Pro Session

Using Soft Buttons

Soft buttons are named by default from F1 to F12. If you have assigned a script to F1, left-clicking on the F1 button is equivalent to sending the script to the host. For more information, see the section, Programming Soft Buttons

Using the Power Pad

Power Pad buttons are named by default from F1, F2, F3 and so on with a few default function names, such as Clear, Enter and Insert.
If you have assigned a script to the F1 button, left-clicking on the F1 button is equivalent to sending the script to the host. For more information, see the section Programming the Power Pad

Using the Run Script Command

The Run Script command is a menu option which enables you to run a script created to automate tasks. For more information, see Running a Specific Script

Upon Connecting to a Host

PowerTerm Pro enables you to specify the name of a script to be run after communication is established. The name of the script file needs to be specified in the Script File text box in the Connect Dialog box. For more information, see the section Step 6: Connecting to a Host

To browse for a specific name of a PSL Script, press the button with three dots to the right of the Script File text box.

Running a Specific Script

PowerTerm Pro enables you to run a script (.PSL) file to automate tasks. For example, you can create a script to login to PowerTerm Pro automatically.

1) From the Script menu, select Run Script. The Run Script dialog box is displayed. It lists all the files in the PowerTerm Pro directory that carry the .PSL extension.

2) Double-click the script file that you wish to run.

You can run a script as you start PowerTerm Pro. To achieve this, you should add the script name to the PowerTerm Pro shortcut or command line. For more information, see Running a Script upon Startup.

3) Click Open. The selected script file is executed. For more information on running scripts, see Running PowerTerm Pro Scripts

Running a Script upon Startup

PowerTerm Pro enables you to run a script upon startup by creating a Windows shortcut to PowerTerm Pro and the specific script file. This option enables you to automatically connect to a host using a PSL script. For more information, see Step 6: Connecting to a Host

The following procedure describes one way to create a shortcut. Consult your Windows 95 documentation for a description of other available options.

3) Select the Programs file folder.

In the Target area, position your cursor after the .EXE file name, add a space and then type the name of the required script (.PSL) file.

You can also add parameters to the script file. These determine communication parameters, i.e., the name of the host to which you want to connect, or the Port number.

In the Target area, position your cursor after the PSL script name, add a space and type the required parameters. Parameters should be separated by a space.

Example:

\PowerTerm Pro\PTW32pro.EXE Telnet.psl abc

PowerTerm Pro recognizes Windows 95 file naming conventions, including spaces in a file name. If you have a setup file with a space in the name, PowerTerm Pro ignores the space and looks directly for the .PSL extension.

7) Click OK. The PowerTerm Pro Properties window is closed and the parameters defined in the specified PSL file were saved for future invoking of PowerTerm Pro.

8) Repeat the process described above for each host.

Running Individual Script Commands

PowerTerm Pro enables you to run individual script commands which you have created.

1) From the Script menu, click Script Command. The Script Command dialog box is displayed:

2) Type the name of the script command you wish to run.

3) Click OK. The specified script command is executed.

Activating a Recorded Script

Once you have recorded a script in memory, you can run it.

Saving a Recorded Script

PowerTerm Pro enables you to save a script from memory to a specific file.

1) From the Script menu, click Save Recorded Script. The Record Script dialog box is displayed:

2) Select the directory in which you wish to save the file.