Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets “谷歌工作表脚本是否和X”对话框_Google Sheets - Fatal编程技术网

Google sheets “谷歌工作表脚本是否和X”对话框

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.

大家好,有人可以告诉我如何让这个脚本退出时,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.
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