【发布时间】:2013-08-20 22:13:48
【问题描述】:
是否可以关闭在 Apps 脚本中打开的 UI 窗口?
但我想看看有没有其他意见。
我有一个弹出的“等待窗口”,我想在活动完成后关闭它。
var app = UiApp.getActiveApplication();
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = getSheetWithSubmissions(ss);
// create UI app, this works fine
app = createWaitPleaseUI(sheet);
ss.show(app);
//simulated activity
Utilities.sleep(5000);
//this doesn't work despite being in the documentation
app.close();
认为这是不可能的,但如果无法做到,希望 Google 将其从他们的文档中删除。
作为一种解决方法,我可以调出第二个 GUI,说“工作完成,单击确定”,然后它就可以正常工作了。
【问题讨论】: