独立脚本
独立脚本是指任何未绑定到 Google 表格、文档、幻灯片或表单文件的脚本。这些脚本会显示在 Google 云端硬盘中的文件中。
创建独立脚本
如需创建独立脚本,最简单的方法是访问 script.google.com
,然后点击左上角的 add新项目。
您还可以通过 Google 云端硬盘创建独立脚本。前往 Google 云端硬盘,然后依次点击新建 > 更多 > Google Apps 脚本。
运行独立脚本
如需从脚本编辑器运行函数,请选择顶部的要执行的函数的名称,然后点击运行。
使用独立脚本
许多独立脚本都是实用脚本,例如,在 Google 云端硬盘中搜索名称包含“未命名”的旧文件,以便您将其删除。
独立脚本还可以作为Web 应用部署,或设置为通过可安装的触发器自动运行。
最后,现在可以通过独立脚本发布插件了。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-21。
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["Standalone Google Apps Scripts are independent scripts not tied to any specific Google file like Sheets, Docs, or Slides, and they reside in your Google Drive."],["You can effortlessly create a standalone script by visiting script.google.com or through Google Drive by navigating to New \u003e More \u003e Google Apps Script."],["Standalone scripts are often utilized as utilities to automate tasks, such as searching and deleting files, or deployed as web apps or triggered automatically."],["They can be run directly from the script editor by selecting the desired function and clicking Run."],["Additionally, add-ons for Google Workspace can now be published using standalone scripts."]]],[]]