De gegenereerde code bekijken
De gegenereerde VBScript-code wordt getoond in de volgende afbeelding.
Schermafbeelding met het volgende VBScript: If Not IsObject application Then Set SapGuiAuto GetObject quot SAPGUI quot 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 quot on quot WScript ConnectObject application quot on quot End If session findById quot wnd 0 quot maximize session findById quot wnd 0 tbar 0 okcd quot text quot PA30 quot session findById quot wnd 0 quot sendVKey 0 session findById quot wnd 0 usr ctxtRP50G PERNR quot text quot.
De volgende afbeelding toont de anatomie van een SAP GUI-automatiseringsscript.
Schermafbeelding die laat zien dat de instructies If Not en End If allemaal deel uitmaken van de initialisatie van het SAP GUI-objectmodel.
session.findById is de GUI-selector.
wnd[0] is het GuiFrameWindow.
/usr/ is het GuiUserArea.
txtP0006-STRAS is een GuiTextField.
.text = "Mijn straat 13" stelt de veldwaarde in.