hi friends,
If it is possible to create a VB Script for auto log on in to SAP app...
I tried with the below code but it was working for the first window but it was not used for second window which currently opened...
here is the code....
Thanks in Advance,
Robert.J
If it is possible to create a VB Script for auto log on in to SAP app...
I tried with the below code but it was working for the first window but it was not used for second window which currently opened...
here is the code....
Code:
Set sapsHShell = WScript.CreateObject("WScript.Shell")
quotes=chr(34)
sapSHShell.Run quotes & "C:\Program Files\SAP\FrontEnd\SAPgui\saplgpad.exe" & quotes ,2,false
wscript.sleep 1000
'Note: Sap Gui Scripting activex control is called from the SAP Launch pad I believe.
Set SapGui = GetObject("SAPGUI")
Set application = SapGui.GetScriptingEngine
Set connection = application.OpenConnection("Prd", True)
wscript.sleep 1000
Set Session = application.children(0)
session.findById("wnd[0]/S_APPL_LOG").text= Username
session.findById("wnd[0]/S_APPL_LOG").text= Password
session.findById("wnd[0]").sendVKey 0
Robert.J