I am using Run Script command to run a vb script. The script runs fine when executed directly but doesn't even execute the first line of the script when called from the Run Script Command.
The script is for SAP GUI but this is not the only instance where this error comes up. I will attach the script for the reference.
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
If Not IsObject(connection) Then
Set connection = application.Children(0)
If Not IsObject(session) Then
Set session = connection.Children(0)
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
session.findById(wnd/usr/cntlCONTAINER/shellcont/shell).focusDate = "20220110"