Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.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 Sheets脚本编辑器Toast功能onFormSubmit触发器未弹出_Google Apps Script_Google Sheets_Toast - Fatal编程技术网

Google apps script Google Sheets脚本编辑器Toast功能onFormSubmit触发器未弹出

Google apps script Google Sheets脚本编辑器Toast功能onFormSubmit触发器未弹出,google-apps-script,google-sheets,toast,Google Apps Script,Google Sheets,Toast,代码行 SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title"); 执行死刑时敬酒。但是,当将toast放入带有表单提交触发器的程序中时,toast不会在电子表格中弹出 SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title"); 我已经玩了几个小时,我相信这个错误是谷歌的一部分。执行代码时不会出现错误;唯一的问题是toast没有弹出。您能否共享执行toa

代码行

SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");
执行死刑时敬酒。但是,当将toast放入带有表单提交触发器的程序中时,toast不会在电子表格中弹出

SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");

我已经玩了几个小时,我相信这个错误是谷歌的一部分。执行代码时不会出现错误;唯一的问题是toast没有弹出。

您能否共享执行toast的完整脚本?
SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");
你现在在我的工作表上做得很好,所以它一定是别的东西

SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");
脚本是否具有电子表格的准确权限

SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");
它不会消失得太快吧?默认情况下,它只会持续几秒钟。通过将
-1
添加到命令中,可以将toast设置为直到关闭为止:

SpreadsheetApp.getActiveSpreadsheet().toast("Message", "Title");
SpreadsheetApp.getActiveSpreadsheet().toast(“消息”、“标题”、-1);

Matty,我对toast本身没有问题,而是在onFormSubmit触发器之后调用toast。下面的代码:
函数onSubmit(e){Logger.log(“调用notify…”);notify();}函数notify(){Logger.log(“toast之前”);SpreadsheetApp.getActiveSpreadsheet().toast(“Message”,“Title”,-1);Logger.log(“toast之后”);}
允许我查看所有日志,但是土司没有出现。进一步调查后,时间触发器也不允许土司弹出。