// Mail the URL of the published web app.MailApp.sendMail('myself@example.com','My Snazzy App',`My new app is now available at ${ScriptApp.getService().getUrl()}`,);
回攻員
String:網頁應用程式的網址
isEnabled()
如果指令碼可做為網頁應用程式存取,則傳回 true。
回攻員
Boolean:如果指令碼是以網頁應用程式形式發布,則為 true;如果不是,則為 false
已淘汰的方法
disable()
已淘汰。這個函式已淘汰,不建議在新指令碼中使用。
停用可透過網頁應用程式存取的腳本。這個方法等同於開啟「Publish > Deploy as web app」對話方塊,然後按一下「disable web app」。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-12-22 (世界標準時間)。"],[[["The `ScriptApp` service allows you to control and interact with the deployment of your script as a web application."],["You can retrieve the web app's URL using `getUrl()`, check its accessibility status with `isEnabled()`, and previously, disable it using the now deprecated `disable()` method."],["The `disable()` method has been deprecated and should no longer be used in new scripts, replaced by the \"Publish \u003e Deploy as web app\" dialog for disabling."],["When deploying your script as a web app, you can use provided methods to obtain its URL and determine if it's enabled for access."]]],[]]