Activating Scripts

When a script is created, it has an activation method assigned that specifies how it is activated. Scripts are only available when a session is connected. You can have more than one script running at a time. This section provides information about activating scripts using each of the configurable activation methods.

If you plan to call a script from another script, a web page, or from the screen reformatter, you do not need to select an activation method for the script in the Script Editor.

Select From Menu

Activate the script from the Options or Term menu of the TE Client. From the Options menu of the TE Client, select Scripting > Execute Script. If more than one script is available for the current host profile, select which script you want to use from the list.

From Another Script

To use a script to call another script, use the following format:

Call ("Name of the script",argument1,argument2,arugment3,argument4)

The arguments are optional and you cannot use more than four of them. They can be variables, strings, Booleans, or numbers. If the argument is a string, it must have quotation marks around it.

On Key Combination

Activate the script by pressing the specified key combination. The script will run if it is currently possible for a script to run.

When Session Connects

The script activates when a session connects using the specified host profile.

On Barcode, MSR, or RFID Scan

The script activates with each barcode, MSR, or RFID scan.

On Screen Update

The script activates (if activation is allowed) every time the text on the emulation screen changes. This includes updates from the host or when the user presses a key and the key value appears on the screen.

From the Screen Reformatter

A Wavelink script can be launched for a specific screen using the screen reformatter. When a script is added for a screen in the reformatter, it is considered a screen action. When the correct screen appears on the device, screen actions (including speech‑to‑text and text-to-speech actions) are performed in the order they appear in the Descriptive View. For information on adding a script to a screen using the screen reformatter, see Adding Scripts to Reformatted Screens.

From Web Pages

Activate the script for the Industrial Browser from a web page using the wls type, followed by the script name. If you plan to launch a script from a web page, do not select a script activation method when you create the script.

Executing Scripts from Web Pages Example 1

This example launches a script called WebAuto when the web page first loads.

<title>TE70 Test1 - Launch Telnet Scripts</title>
<meta http-equiv="OnStartup" content="wls:WebAuto">

Executing Scripts from Web Pages Example 2

This example launches a script called WebClick when a user clicks the hyperlink “here” on the web page.

<p>
Click <a href="wls:WebClick">here</a> to launch the &quot;WebClick&quot; script.
</p>

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal