I recorded in SAP.
When I clicked Scripts1.vbs file, it's going well replayed.
But when run in PAD VB Script, it fails with below message.
(SAP GUI 730 and 770 same result)
C:\Users\OOOO\AppData\Local\Temp\Robin\teozxidxbpc.tmp(2, 4)(null): invalid syntax
There is nothing any file in directory AppData\Local\Temp\Robin\
Below is script
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
session.findById("wnd[0]/tbar[0]/okcd").text = "/NZZZZ0000"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/radP_RAD9").select
session.findById("wnd[0]/usr/ctxtS_UNAME-LOW").text = "199999999"
session.findById("wnd[0]/usr/radP_RAD9").setFocus
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/tbar[1]/btn[45]").press
session.findById("wnd[1]/usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[4,0]").select
session.findById("wnd[1]/usr/subSUBSCREEN_STEPLOOP:SAPLSPO5:0150/sub:SAPLSPO5:0150/radSPOPLI-SELFLAG[4,0]").setFocus
session.findById("wnd[1]/tbar[0]/btn[0]").press
Anyone can Help me?
Thank you.