Skip to Content
Mar 12, 2013 at 08:20 AM

A Questions About the Integration of SAP GUI Scripting in NWBC


Hello NWBC developers and community,

I use SAP GUI Scripting very much and at the moment I test the possibilities of SAP GUI Scripting with NWBC 4.0 PL4.

First of all, it works very well, congratulation to the developers.

And now my question:

If I open a second NWBC Client window and use the method Connections from the Application object with the property Count, I get not more than one connection. Is this a bug or is it necessary to use another property or method to get this kind of information? SAP GUI Scripting uses only the first NWBC Client window.

Here my VBScript code:

Set SapGuiAuto = GetObject("SAPGUISERVER")

Set application = SapGuiAuto.GetScriptingEngine

Set conCol = application.Connections()

conCount = conCol.Count()

MsgBox CStr(conCount)

Here a snapshot:

Thanks for answers and hints.