我需要创建AutoIT脚本,将其称为:
wmic path win32_tcpipprinterport where "hostaddress = 'server1'" set hostaddress="server2"
试图合并这样的引号:
$CMD = 'wmic path win32_tcpipprinterport where ""hostaddress = ''server1''"" set hostaddress=""server2"" & pause'
RunWait(@ComSpec & " /c " & $CMD)
但是仍然无法使其正常工作。 请您帮忙吗?
答案 0 :(得分:1)
但仍然无法使其正常工作。
示例:
function addFormattedSpreadsheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sh = ss.getActiveSheet();
var row = sh.getActiveRange().getRowIndex();
var rData = sh.getRange(row, 1, 1, 3).getValues();
var templateCopy = ss.getSheetByName('Template');
if (row == 1) {
ss.toast("This is the header");
return //This sends the user an error if the first row is selected when the script is activated
}
if(rData[0][0] != null || rData[0][1] != null || rData[0][2] != null) {
try {
ss.insertSheet(rData[0][2], {template: templateCopy}); //Creates the new sheet
ss.setActiveSheet(ss.getSheets()[0]); //sets the first roster sheet as the active sheet
//Not sure what this does:
sh.getRange("D"+(row)).setValue(new Date());
} catch(e) {
throw 'This player already exists.';
}
}
}