我有两个标签 - 正在进行和已完成。如果列A显示“已完成”,我想移动整行。该脚本已运行,并且有一条通知显示“已完成的脚本”,但没有任何反应。第1列是一个公式 但我想将它们作为值粘贴在“已完成”标签
中 function onEdit(event) {
// assumes source data in sheet named In Progress
// target sheet of move to named Completed
// test column with Completed is col 1 or A
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = SpreadsheetApp.getActiveSpreadsheet();
var r = SpreadsheetApp.getActiveRange();
if(s.getName() == "In Progress" && r.getColumn() == 1 && r.getValue() == "Completed") {
var row = r.getRow();
var numColumns = s.getLastColumn();
var targetSheet = ss.getSheetByName("Completed");
var target = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
s.getRange(row, 1, 1, numColumns).moveTo(target);
s.deleteRow(row);
}
}
答案 0 :(得分:0)
脚本包含条件
var add_to_group;
add_friend = "CODE:";
add_friend += "SET !TIMEOUT_STEP 1" + "\n";
add_friend += "TAG POS={{i}} TYPE=BUTTON ATTR=TXT:Accept<SP>Request" + "\n";
var i = 1;
while (i < 7) {
if (if the button says 'Accept Request' then click it") { // This is where I don't know what to put
iimSet("i", i);
// Clicks the button
iimPlay(add_to_group);
}
i++;
}