Try something like this:
function onMyChange(e) {
const sh=e.source.getActiveSheet();
//e.source.toast('Entry');//for debugging
//sh.getRange('A1').setValue(JSON.stringify(e));//You use this to learn more about the event object
if(sh.getName()=='Sheet1' && e.changeType=="EDIT") {//I assume you're using EDIT changeType
//e.source.toast('Sheet1')//for debugging
//do your stuff in here
}
}
I don't know what changeType you want to use.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…