Code: Alles auswählen.
Dim objSapgui
Set objSapgui = GetObject("SAPGUI")
Dim objScriptingEngine
Set objScriptingEngine = objSapgui.GetScriptingEngine
WScript.ConnectObject objScriptingEngine, "Engine_"
Dim waiting
waiting = 1
Do While (waiting = 1)
WScript.Sleep (100)
Loop
Set objScriptingEngine = Nothing
Set objSapgui = Nothing
Sub engine_CreateSession(ByVal Session)
Dim result
result = MsgBox("Session created", vbOKCancel)
If result = vbCancel Then
waiting = 0
End If
End Sub