我可以在应用程序脚本中使用appendListItem将一堆项目作为编号列表添加到google文档中。有什么方法可以将其从编号更改为项目符号?
是否可以关闭在Apps脚本中打开的UI窗口?
我认为答案是不对的:http://code.google.com/p/google-apps-script-issues/issues/detail?id = 474&can = 1&q =.close%28%29&cospec = Stors%20Opened%20ID %20Type%20Status%20Summary%20Component%20Owner
但我想知道是否还有其他意见.
我有一个弹出的"等待窗口",我希望在活动结束时关闭.
var app = UiApp.getActiveApplication();
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = getSheetWithSubmissions(ss);
// create UI app, this works fine
app = createWaitPleaseUI(sheet);
ss.show(app);
//simulated activity
Utilities.sleep(5000);
//this doesn't work despite being in the documentation
app.close();
Run Code Online (Sandbox Code Playgroud)
认为这是不可能的,但希望谷歌如果无法完成,就会从文档中删除它.
作为一种解决方法,我可以调出第二个GUI,说"工作完成,单击确定"然后它工作正常.
我正在使用Apps脚本在Google协作平台中构建用户界面,我可以创建一个列表框.根据文档,如果您将setVisibleItemCount更改为1,它将成为一个下拉框.
我试过了1和0.
似乎都没有把它变成一个下拉框.使用Firefox 13.0.1查看.也试过Safari.
有人有运气吗?
代码如下所示:
var vPanel = container.createVerticalPanel();
//List box
var lb = container.createListBox(true).setId('listbox').setName('listbox');
// add items to ListBox
for(var i=0;i<LIST_OF_PROJECTS.length;i++){
lb.addItem(LIST_OF_PROJECTS[i]);
}
vPanel.add(lb);
lb.setVisibleItemCount(1); //supposed to make it a drop-down but doesn't
lb.setSelectedIndex(0);
Run Code Online (Sandbox Code Playgroud)
这些都在Google网站内,正在显示的页面是Apps脚本页面.也许您没有使用Google协作平台?上面的代码给了我一行但没有下拉箭头.