【发布时间】:2021-06-23 06:01:42
【问题描述】:
我是 Google 应用程序编程的新手。我需要有关使用具有 40 秒间隔循环的 Google 工作表宏打开和关闭 Chrome 选项卡的帮助
这是我打开标签的代码
function openTab() {
var selection=SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>";
var userInterface = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab');
}
我只是不知道如何关闭当前的 chrome 选项卡并在 40 秒内进行循环。 提前致谢!
【问题讨论】:
-
嗨@KevinStevenAsistin,下面的答案能否解决您的问题?