I think that you are taking the wrong approach.
Rhetorical question
What about if instead of doing the validation "before running the script" you include that validation when the script is running? This could be done in the same way that you are are checking that the YES button was clicked.
If what you are looking for is how to read the value of Q1
use
var name = 'Sheet1'; // Put here the name of the sheet holding the Q1 cell of interested
var value = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(name).getRange('Q1').getValue();
NOTE: For brevity the above code include only two code lines, you might want to use a variable for each of the spreadsheet, sheet and range objects to make it easier to debug / troubleshoot.
Here is a quick & dirty way to apply the above:
function Ok() {
var ui = SpreadsheetApp.getUi();
var name = 'Sheet1'; // Put here the name of the sheet holding the Q1 cell of interested
var value = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(name).getRange('Q1').getValue();
if(value !== 0) {
ui.alert('Q1 is different from 0');
return;
}
var click = ui.alert("are you sure you want to send?",ui.ButtonSet.YES_NO)
if (click == ui.Button.YES){
send();
}
}