问题描述
我有一个可用的 Google 幻灯片 2020 版,我将其复制到了 2021 版。 但现在我得到了错误
Exception: Action not allowed
refreshSlides @ Code.gs:9
脚本是:
function refreshSlides(){
var currentPresentation,i,linkedSlide,numSlides
// loop through all slides and refresh them
currentPresentation = SlidesApp.getActivePresentation();
numSlides = currentPresentation.getSlides().length;
for (i = 0; i < numSlides; i++) {
linkedSlide = currentPresentation.getSlides()[i]
linkedSlide.refreshSlide();
Utilities.sleep(5000);
}
}
我尝试通过向 appsscript.json 添加(见下文)来添加授权
"oauthScopes": [
"https://www.googleapis.com/auth/presentations.currentonly","https://www.googleapis.com/auth/presentations"
],
但这并没有帮助。 我在这里错过了什么??
解决方法
正如 official documentation 中所述,for(var i in users){
String name = i['first_name'] + " "+ i['last_name'];
print(name);}
ListView.separated(
itemCount: users.length,separatorBuilder: (context,index) => Divider(),itemBuilder: (BuildContext context,int index) {
var user = users[index];
return ListTile(
title: Text(name),isThreeLine: true,);
},),
会抛出错误:
如果对源演示文稿的读取权限不再可用。
确保您拥有当前演示文稿和每张幻灯片的读取权限。
,已解决,有一张幻灯片是“链接幻灯片” 链接幻灯片未经授权。