Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation Errors when upgrading from Extra 6.4 to 8.0

Status
Not open for further replies.

nealmetty

Programmer
Jul 25, 2006
3
GB
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.
 
I don't see the m_objScreen being set anywhere?

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Okay, the m_objScreen is set here with the other Extra objects.

Option Explicit

Dim m_objSystem As EXTRA.ExtraSystem
Dim m_objSessions As EXTRA.ExtraSessions
Dim m_objSession As EXTRA.ExtraSession
Dim m_objScreen As EXTRA.ExtraScreen

Suffice so say, the code base has not been changed in any way.

Regards,
Neal.
 
Does this work at all?

Code:
Sub Main

    Dim m_objSystem As Object
    Dim m_objSession As Object
    Dim m_objScreen As Object
    
    Set m_objSystem = CreateObject("EXTRA.System")
    Set m_objSession = m_objSystem.ActiveSession
    Set m_objScreen = m_objSession.Screen

    m_objScreen.SendKeys ("What's Up Doc?")
    m_objScreen.WaitHostQuiet (100)
    
End Sub


[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
The code snippet executed the .sendkeys without a problem.

Regards,
Neal.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top