Hi, community. I do have vbs script which scrolls through SAP window. If I launch it manually by clicking on vbs file everything works fine (I have tested it 10 times). However, running this script using “Invoke Code” activity with a code “System.Diagnostics.Process.start” gives me following error:
The same errors occurs when I use Start Process activity instead of Invoke Code, however launching this script manually is fine.
Here is a code of Script1.vbs:
Blockquote
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
session.findById(“wnd[0]”).maximize
For i = 0 To 366 Step 30
session.findById(“wnd[0]/shellcont/shell”).firstVisibleRow = i
Next