Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 谷歌脚本-如何在脚本处理开始时将文本写入屏幕_Google Apps Script - Fatal编程技术网

Google apps script 谷歌脚本-如何在脚本处理开始时将文本写入屏幕

Google apps script 谷歌脚本-如何在脚本处理开始时将文本写入屏幕,google-apps-script,Google Apps Script,我有一个谷歌应用程序脚本,我需要输出文本到屏幕上 我知道这可以通过以下方式实现 return HtmlService.createHtmlOutput("blah blah"); 但我需要在脚本开始处理时,而不是在脚本返回时,将文本写入屏幕 我怎样才能做到这一点呢?这取决于脚本使用的是什么服务,以及它所在的容器(如果有的话)。例如,在电子表格中,您可以弹出“toast”消息。然而,您似乎正在使用HtmlService,很可能是作为一个已部署的web应用程序 一种选择是替换html页面上元素的文

我有一个谷歌应用程序脚本,我需要输出文本到屏幕上

我知道这可以通过以下方式实现

return HtmlService.createHtmlOutput("blah blah");
但我需要在脚本开始处理时,而不是在脚本返回时,将文本写入屏幕


我怎样才能做到这一点呢?

这取决于脚本使用的是什么服务,以及它所在的容器(如果有的话)。例如,在电子表格中,您可以弹出“toast”消息。然而,您似乎正在使用HtmlService,很可能是作为一个已部署的web应用程序

一种选择是替换html页面上元素的文本内容。请参阅,以获取此示例