は、このような理由のために、次のスクリプトは、ログイン後に一日に自動的に実行されます。
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
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
wscript.sleep 2000
do
'if time() > "16:00" then exit do
on error resume next
session.findById("wnd[0]").maximize
if err.number <> 0 then exit do
on error goto 0
session.findById("wnd[0]/tbar[0]/okcd").text = "/o"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[1]").close
wscript.sleep 29000
Loop
よろしく、 ScriptMan