Skip to Content
0
Former Member
Mar 30, 2012 at 02:01 PM

VBS Script recording with Pause

960 Views

Dear Gurus,

I have managed to have SAP create a VBS script with the Record and Playback function. I am using it for my Picking Progress (TC LT45) Also I can run it without problems. However, I am looking for a Pause / Wait function after the F8

There seem to be a number of options to build in a Pause. I have not managed to make it work. Is there a way? XThanks for your input.

Nick 😕

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]").resizeWorkingPane 263,47,false

session.findById("wnd[0]").sendVKey 8

session.findById("wnd[0]").sendVKey 3

session.findById("wnd[0]").sendVKey 8

session.findById("wnd[0]").sendVKey 3

session.findById("wnd[0]").sendVKey 8

session.findById("wnd[0]").sendVKey 3

session.findById("wnd[0]").sendVKey 8

session.findById("wnd[0]").sendVKey 3