lambert27407
Technical User
I am trying to setup a function to use in my automation programs that checks to see if you are at the login screen and will reset the terminal object on my form without having to reload the form. Am I missing somthing?
Here is my code:
Public Shared Function AtLogin(ByVal Terminal As Object)
Dim varIsAtStartScreen As String
With Terminal.Session.Screen
'System will check to make sure you are at starting screen
varIsAtStartScreen = .GetString(20, 2, 5)
If varIsAtStartScreen = "Logon" Then
'If you are at login screen returns value of "Logon" in varIsAtStartScreen
Return varIsAtStartScreen
Exit Function
Else
'If you are not at login screen it will reset the terminal control
Terminal.Session.Reset()
End If
End With
Return varIsAtStartScreen
End Function
I am referencing this Reset methond....I found this on Attachmates website
Description
Used with the Session object, Reset returns the display to its power-up operating state. Session.Reset is only valid for VT terminal sessions.
Used with the Waits collection, Reset temporarily clears the state of its wait-type objects.
Syntax
object.Reset
Element Description
Object The Session object or Waits collection
© 1996 - 2004, Attachmate Corporation. All rights reserved.
Here is my code:
Public Shared Function AtLogin(ByVal Terminal As Object)
Dim varIsAtStartScreen As String
With Terminal.Session.Screen
'System will check to make sure you are at starting screen
varIsAtStartScreen = .GetString(20, 2, 5)
If varIsAtStartScreen = "Logon" Then
'If you are at login screen returns value of "Logon" in varIsAtStartScreen
Return varIsAtStartScreen
Exit Function
Else
'If you are not at login screen it will reset the terminal control
Terminal.Session.Reset()
End If
End With
Return varIsAtStartScreen
End Function
I am referencing this Reset methond....I found this on Attachmates website
Description
Used with the Session object, Reset returns the display to its power-up operating state. Session.Reset is only valid for VT terminal sessions.
Used with the Waits collection, Reset temporarily clears the state of its wait-type objects.
Syntax
object.Reset
Element Description
Object The Session object or Waits collection
© 1996 - 2004, Attachmate Corporation. All rights reserved.