我在 P7 中有一个脚本(MS Office 的俄罗斯模拟,使用 JavaScript 作为内部宏语言)——我有一个数据列表 我有 SAP GUI - 在 RedOS 下工作的版本,它在 JS 中记录脚本如下
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPMSSY0.0120
// event title "Output from handling units"
session.findById("wnd[0]").resizeWorkingPane(240,33,true);
userarea.findById("chk[1,3]").setFocus();
userarea.findById("chk[1,3]").selected = true;
userarea.findById("chk[1,4]").selected = false;
window.findById("tbar[1]/btn[16]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPLFPCOMP.0500
// event title "Print Preview, Document 1 of 1"
window.findById("tbar[0]/btn[3]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPMSSY0.0120
// event title "Output from handling units"
userarea.findById("chk[1,3]").setFocus();
userarea.findById("chk[1,3]").selected = false;
userarea.findById("chk[1,4]").selected = true;
window.findById("tbar[1]/btn[16]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPLFPCOMP.0500
// event title "Print Preview, Document 1 of 1"
window.findById("tbar[0]/btn[3]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPMSSY0.0120
// event title "Output from handling units"
userarea.findById("chk[1,4]").selected = false;
userarea.findById("chk[1,5]").setFocus();
userarea.findById("chk[1,5]").selected = true;
window.findById("tbar[1]/btn[16]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPLFPCOMP.0500
// event title "Print Preview, Document 1 of 1"
window.findById("tbar[0]/btn[3]").press();
// ---------------------------------------------------------------------------
// modus 0
// event dynpro SAPMSSY0.0120
// event title "Output from handling units"
userarea.findById("chk[1,5]").setFocus();
需要将这个录制的 SAP GUI 脚本与我在 SAP GUI on JS 之外的代码连接起来。如何从 JS 调用 SAP GUI?