在 Google 脚本中显示进度

mfa*_*aiz 1 javascript notifications google-sheets google-apps-script

我想向用户显示一个冗长脚本的进度。理想情况下,我想使用running script cancel dismiss运行 Google 脚本时出现的黄色吐司

我知道你可以抛出自定义错误,但如何将自定义消息抛出到这个黄色框。

或者另一种选择也可以。不是 msgbox,因为它会停止脚本。

mfa*_*aiz 6

I ended up using the spreadsheet class of toast:

SpreadsheetApp.getActiveSpreadsheet().toast('message')