'-Begin-----------------------------------------------------------------
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
session.findById("wnd[0]/tbar[0]/okcd").text = "/nSE16"
session.findById("wnd[0]/tbar[0]/btn[0]").press
WScript.Sleep 500
WScript.Echo "Test"
'-End-------------------------------------------------------------------
'-Begin-----------------------------------------------------------------
'-Directives----------------------------------------------------------
Option Explicit
'-Variables-----------------------------------------------------------
Dim ScrCtrl, Cmd
'-Main----------------------------------------------------------------
Set ScrCtrl = CreateObject("MSScriptControl.ScriptControl")
If IsObject(ScrCtrl) Then
ScrCtrl.AllowUI = vbTrue
ScrCtrl.Language = "VBScript"
Cmd = "WScript.Echo ""Hello World"""
ScrCtrl.ExecuteStatement Cmd
End If
'-End-------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 | |
2 |