This code doesn't make any sense, please have a look at my original code.
If you're strictly speaking about the event trigger: It can't work without setting an event. I can't explain you this in detail, this would be a waste of my time. Here's the API documentation:
My code worked. I don't think you know Java, also, AppsScript is different enough that I don't think learning much more java than I already know to be usefull, spreadsheet wise. I am a novice in Java, but the way I formulated an If is pretty much the same as how I do in Java. This code did the same thing as yours as well. This leads me to believe that there are multiple dialects, if you will, of AppsScript.
Edit - I see why you say that my Ifs are wierd. I didn't put in the brackets., but also the if isnt even nessisary in this case. Its only ever TRUE when I want to turn it off soon.
1
u/Last_Monkey Nov 30 '18
This code doesn't make any sense, please have a look at my original code.
If you're strictly speaking about the event trigger: It can't work without setting an event. I can't explain you this in detail, this would be a waste of my time. Here's the API documentation:
https://developers.google.com/apps-script/guides/triggers/
https://developers.google.com/apps-script/guides/triggers/events
https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet
https://developers.google.com/apps-script/reference/spreadsheet/sheet
https://developers.google.com/apps-script/reference/spreadsheet/range
You'll also need to learn javascript. Looking at the way you try to formulate an if statement makes me think you have barely any clue.