On Screen Update

This option causes the script to be activated (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 is shown on the screen.

The following example generates a script that enters a command each time a particular string appears on the screen:

Label:Start:

If (String_Equal(Get_Screen_Text_Columns(1,1,5),“Ready”, 0,FALSE))

Keypress_String(“Proceed”)

Keypress_Key(“Enter”)

End_If

Wait_For_Screen_Update

Goto: Start

Return

If this script is set to activate when the session first connects, it will work as desired with one limitation. Because it is always activated, no other scripts can be activated during the emulation session.

Here is an alternate implementation:

If (String_Equal(Get_Screen_Text_Columns(1,1,5), “Ready”, 0, FALSE))

Keypress_String(“Proceed”)

Keypress_Key(“Enter”)

End_If

Return

If the script is set to run each time the screen updates, you get the desired behavior. Because the script is not active all the time, other scripts can be activated as well.

Use this activation option carefully as it can cause a script to be executed frequently.

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal