on 03-30-2012 3:01 PM
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
I use the following in my scripts to pause the script:
Set Wshell = CreateObject("WScript.Shell")
wscript.sleep 100
You can change the milliseconds from 100 to whatever works best for you.
Regards
Umur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.