My organisation is upgrading to Extra 8.0 from 6.4.
One of our client front ends, which references the type library, no longer works. Basically the application is erroring on the .sendkeys method of the screen object.
The error message is:
Run-time error '-2147417851 (80010105)':
Automation error
The server threw an exception.
The code below, the error occurs on the initial .SendKeys:
Private Sub CAPSILSendText(TextToSend As String)
On Error GoTo CAPSILSendTextErr
Dim objOIA As EXTRA.ExtraOIA
Dim TimeOut As Date
m_objScreen.SendKeys (TextToSend)
m_objScreen.WaitHostQuiet (100)
' Wait for the screen to be updated.
Set objOIA = m_objScreen.OIA
' Set up the time out
TimeOut = Now() + (m_lngTimeOutSecs / 86400) ' Add Seconds
'Loop waiting for the XStatus to be anything other than Busy(5 or 8)
Do While True
If Not objOIA.XStatus = 5 And _
Not objOIA.XStatus = 8 Then
Exit Do
ElseIf (Now > TimeOut) Then
Err.Raise ERROR_TIMED_OUT, ERROR_SOURCE & " : CAPSILSendText", "No response was received within the time out period."
End If
Loop
Set objOIA = Nothing
Exit Sub
CAPSILSendTextErr:
' Raise our own errors as is, for all other errors raise the default error
If Err.Number > 0 Then
Err.Raise ERROR_DEFAULT, ERROR_SOURCE & ":CAPSILSendText", Err.Description
Else
Err.Raise Err.Number, Err.Source, Err.Description
End If
End Sub
I cant see anything obviously wrong with the code at first glance but would appreciate some input whilst I investigate.
Regards,
Neal.
One of our client front ends, which references the type library, no longer works. Basically the application is erroring on the .sendkeys method of the screen object.
The error message is:
Run-time error '-2147417851 (80010105)':
Automation error
The server threw an exception.
The code below, the error occurs on the initial .SendKeys:
Private Sub CAPSILSendText(TextToSend As String)
On Error GoTo CAPSILSendTextErr
Dim objOIA As EXTRA.ExtraOIA
Dim TimeOut As Date
m_objScreen.SendKeys (TextToSend)
m_objScreen.WaitHostQuiet (100)
' Wait for the screen to be updated.
Set objOIA = m_objScreen.OIA
' Set up the time out
TimeOut = Now() + (m_lngTimeOutSecs / 86400) ' Add Seconds
'Loop waiting for the XStatus to be anything other than Busy(5 or 8)
Do While True
If Not objOIA.XStatus = 5 And _
Not objOIA.XStatus = 8 Then
Exit Do
ElseIf (Now > TimeOut) Then
Err.Raise ERROR_TIMED_OUT, ERROR_SOURCE & " : CAPSILSendText", "No response was received within the time out period."
End If
Loop
Set objOIA = Nothing
Exit Sub
CAPSILSendTextErr:
' Raise our own errors as is, for all other errors raise the default error
If Err.Number > 0 Then
Err.Raise ERROR_DEFAULT, ERROR_SOURCE & ":CAPSILSendText", Err.Description
Else
Err.Raise Err.Number, Err.Source, Err.Description
End If
End Sub
I cant see anything obviously wrong with the code at first glance but would appreciate some input whilst I investigate.
Regards,
Neal.