So I hear that you guys are the experts...
I have the following code that doesn't seem to work anymore. I want it to set the current session of Extra that is open, instead it opens another session of EXTRA which isn't even the same application that I want to use.
The same of the application that is open is MCSmod4, this code will open MAINFRAME.
Any help?
I have the following code that doesn't seem to work anymore. I want it to set the current session of Extra that is open, instead it opens another session of EXTRA which isn't even the same application that I want to use.
The same of the application that is open is MCSmod4, this code will open MAINFRAME.
Any help?
Code:
Private Sub Command0_Click()
'On Error GoTo Errorhandler
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System Is Nothing) Then
MsgBox "Could not create the EXTRA System object. Stopping macro playback."
Stop
End If
Set Sessions = System.Sessions
If (Sessions Is Nothing) Then
MsgBox "Could not create the Sessions collection object. Stopping macro playback."
Stop
End If
' Set the default wait timeout value
g_HostSettleTime = 1000 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 Is Nothing) Then
MsgBox "Could not create the Session object. Stopping macro playback."
Exit Sub
End If
If Not Sess0.Visible Then Sess0.Visible = True
Sess0.Screen.WaitHostQuiet (g_HostSettleTime)