# $language = "VBScript" # $interface = "1.0" Sub Main Dim x,y snt.WindowState = 1 'Normal (SW_SHOW) x = snt.GetViewWidth y = snt.GetViewHeight snt.Synchronous = False snt.StatusLine "Screen: x=" & x & " y=" & y ' Connect to active site (assumes connection not requiring user input for login) If snt.Connect("Active") = TRUE Then if snt.WaitForString("/home/zkrr01 $",30) = TRUE Then ' Send the host the command to do a long directory list snt.Send "ls -l" + vblf If snt.WaitForString("/home/zkrr01 $",30) = TRUE Then ' Copy Scroll buffer to the clipboard snt.CopyScrollToClipboard() snt.StatusLine "" End If End If Do While snt.Connected Loop Answer = snt.MessageBox("Disconnected, quit SecureNetTerm application?","SNTScript",4) if Answer = 6 Then snt.QuitApp Exit Sub End If End If End Sub