Google sheets “谷歌工作表脚本是否和X”对话框
大家好,有人可以告诉我如何让这个脚本退出时,X是按rigth现在看起来它做的一样,如果我按no 任何帮助都将不胜感激 谢谢Google sheets “谷歌工作表脚本是否和X”对话框,google-sheets,Google Sheets,大家好,有人可以告诉我如何让这个脚本退出时,X是按rigth现在看起来它做的一样,如果我按no 任何帮助都将不胜感激 谢谢 function ticketSaveEmailYesNo(){ // Display a dialog box with a message and "Yes" and "No" buttons. The user //can also close the // dialog by clicking the close button in its title bar.
function ticketSaveEmailYesNo(){
// Display a dialog box with a message and "Yes" and "No" buttons. The user
//can also close the
// dialog by clicking the close button in its title bar.
var ui = SpreadsheetApp.getUi();
var response = ui.alert(
'Please Confirm',
'Email a copy of this ticket to the client',
ui.ButtonSet.YES_NO);
// Process the user's response.
if (response == ui.Button.YES) {
ticketSaveAndMail();
} else {
ticketSavePDF()
}
}
将“处理用户的响应”更改为
if (response == ui.Button.YES) {
ticketSaveAndMail();
}
if (response == ui.Button.NO) {
ticketSavePDF()
}
else {
}
}
这将处理NO响应。其他人将处理X