// Display a dialog box with a message and "Yes" and "No" buttons.constui=DocumentApp.getUi();constresponse=ui.alert('Are you sure you want to continue?',ui.ButtonSet.YES_NO,);// Process the user's response.if(response===ui.Button.YES){Logger.log('The user clicked "Yes."');}else{Logger.log('The user clicked "No" or the dialog\'s close button.');}
[[["易于理解","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"]],["最后更新时间 (UTC):2024-12-22。"],[[["`Button` is an enum representing localized dialog buttons returned by alerts or prompts, indicating user action."],["These predetermined button values (`CLOSE`, `OK`, `CANCEL`, `YES`, `NO`) cannot be set directly but are accessed via `ui.Button`."],["To add buttons to alerts or prompts, use `ButtonSet` instead of individual `Button` values."],["The provided example code demonstrates using `Button` to handle user responses from a dialog."]]],[]]