gpt4 book ai didi

google-apps-script - 如何在运行 google 应用程序脚本时显示负载指示器

转载 作者:行者123 更新时间:2023-12-04 01:37:07 24 4
gpt4 key购买 nike

enter image description here

如何在运行 google 应用程序脚本时显示负载指示器

最佳答案

如果您想在图像显示和执行时停止与工作表的交互,您可以尝试使用 UI 方法 showModalDialog() .

因此,像这样的事情可以解决您要实现的目标:

function showDialog() {

var ui = SpreadsheetApp.getUi();
// Display a modal dialog box with custom HtmlService content.
var htmlOutput = HtmlService
.createHtmlOutput('<img src=/image/AuqJU.gif>')
.setWidth(250)
.setHeight(300);
ui.showModalDialog(htmlOutput, 'Script Running');


}

如果您想更好地控制对话框的关闭,则需要从客户端进行。修改 showModalDialog() 中的 HTML 对象.如果您对此感兴趣,我建议您查看 this question .

您还可以查看有关 dialogs and other UI elements 的 Apps 脚本文档。 .

关于google-apps-script - 如何在运行 google 应用程序脚本时显示负载指示器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59139281/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com