View Single Post
  #1  
Old 01-08-2021, 07:58 AM
WesR WesR is offline
Registered User
 
Join Date: Mar 2005
Location: USA
Posts: 137
Exit Script without error popup

Hi,

My ultimate goal is to monitor the SSH session for a defined string and then create a dialog and send text when that string is found.

This I can do, but it gives an error whenever the SSH connection is lost. I want to suppress popup error and just exit the script.

I am starting the scrip using the Logon script option under Connection->Logon Actions.

The relevant part of the script looks like this:

Code:
crt.Screen.Synchronous = True
Sub Main
	'handle the login details here

	crt.Screen.Synchronous = False
	Do while 1
		If crt.Screen.WaitForString ("Explict Text") = True Then
			Result = crt.Dialog.Prompt("Enter a value", "Enter Value")
			If Result = "" Then exit sub
			'send the results here
		End If
	Loop
End Sub
I've tried playing On Error, but can't seem to get it to work for me.

Are you aware of another way to implement this functionality or to suppress the Connection Lost Error?

Currently running 8.2.0.

Thanks,

Wes
Reply With Quote