獨立的指令碼
獨立指令碼是指未繫結至 Google 試算表、文件、簡報或表單檔案的任何指令碼。這些指令碼會顯示在 Google 雲端硬碟中的檔案中。
建立獨立指令碼
如要建立獨立指令碼,最簡單的方法是前往 script.google.com
,然後按一下左上方的 add「新專案」。
您也可以透過 Google 雲端硬碟建立獨立指令碼。前往 Google 雲端硬碟,然後依序點選「新增」>「更多」>「Google Apps 腳本」。
執行獨立指令碼
如要透過指令碼編輯器執行函式,請選取頂端要執行的函式名稱,然後按一下「Run」。
使用獨立指令碼
許多獨立指令碼都是公用指令碼,例如在 Google 雲端硬碟中搜尋名稱含有「untitled」的舊檔案,以便刪除這些檔案。
您也可以將獨立指令碼部署為網頁應用程式,或是設定自動執行可安裝的觸發事件。
最後,現在可以從獨立指令碼發布外掛程式。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間: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."]]],[]]