user-interface - 是否可以在 Google Apps 脚本中获取其他人的 UI?
问题描述
在 Google Apps 脚本中,当您使用属性:DocumentApp.getUi()
时,它会获取正在使用它的人的 UI。如果您使用DocumentApp.getUi().alert()
,那么它会向正在使用该脚本的人发送警报。我想知道是否有办法在 Google Apps 脚本中提醒其他人的 UI,而不是提醒正在使用该脚本的人。这是我的代码示例:
DocumentApp.getActiveDocument()
.removeViewer(userName.getResponseText())
.removeEditor(userName.getResponseText());
DocumentApp.getUi()
.alert("Your access is being removed.")
现在,如果可能的话,那就太好了,想象一下所有的可能性!有人请帮忙!
解决方案
除了调用该函数的浏览器之外,无法访问任何浏览器的 UI。这也是时间驱动触发器无法显示 UI 模式的原因(它们在非本地执行)。
推荐阅读
- powershell - PowerShell:使用输出中的多个值之一
- c++ - VS2017:指定了不支持的着色器模型
- java - 解析日期在 webapp 中出现错误
- nlp - word2vec 中的多个单词(比如短语)向量
- javascript - 使用 javascript 的 Mailto 附件不起作用(实现的替代方法)?
- performance - 执行 Jmeter 脚本时相同请求的 50% 样本失败
- android - 如何在我的片段和适配器中添加更多负载
- c# - UWP - 比较 JSON 和数据库上的数据
- javascript - 将路由参数验证为对象数组
- velo - Wix - 打开带有参数的页面?