sapui5 - 使用 Jacob 识别多个 sap 窗口会话
问题描述
当多个 SAP 应用程序窗口打开时,是否有办法使用 Jacob 来识别这些 SAP 会话。
我目前正在使用以下代码块来识别会话,并且它在仅打开一个 SAP 窗口时工作。
public ActiveXComponent getSapSession() {
ComThread.InitSTA();
this.SAPROTWr = new ActiveXComponent("SapROTWr.SapROTWrapper");
try {
this.ROTEntry = this.SAPROTWr.invoke("GetROTEntry", "SAPGUI").toDispatch();
this.ScriptEngine = Dispatch.call(this.ROTEntry, "GetScriptingEngine");
this.GUIApp = new ActiveXComponent(this.ScriptEngine.toDispatch());
this.Connection = new ActiveXComponent(this.GUIApp.invoke("Children", 0).toDispatch());
this.Session = new ActiveXComponent(this.Connection.invoke("Children", 0).toDispatch());
} catch (Exception var2) {
System.out.println(var2.getMessage().toString());
}
return this.Session;
}
在打开多个 SAP 窗口的情况下,Jacob 是否能够唯一识别这些窗口?
如果是这样,我们该怎么做?感谢您的回答。
解决方案
推荐阅读
- c# - c# 8 NonNullable Reference Types in foreach 产生奇怪的警告信息
- ios - 使用 UIKit 登录“使用 Apple 登录”iOS 13 时如何解决键盘问题?
- kotlin-coroutines - channelFlow 和 callbackFlow 有什么区别
- static - 如何在 React Native 的组件中导出和导入静态?
- c# - 如何在 C# Task.Factory.StartNew 中等待几秒钟
- robotframework - 哪种模型更适合机器人框架实现?
- email - 使用 groovy 在 Jmeter 中根据收件人电子邮件 ID 读取电子邮件
- python - 用于 python 的 Azure eventthub 库
- javascript - 如何在我的侧边栏中悬停时进行动态下拉?
- java - Java 正则表达式必须在字符串的开头或结尾匹配