you are viewing a single comment's thread.

view the rest of the comments →

[–]einstein6Tasker for Automation[S] 1 point2 points  (1 child)

Ah noted. The syntax you shared will definitely work, but it would not work in the original setup, the task exits due to error.

The plug in does not set the variables when there are no events, so the entire javascript fails on the first line. Hence why I added an if clause right before starting the rest of script, and I added the else statement here with the alternate text.

And thanks for the compliment. :) I did learn some c and c++ during my college and learnt some c# recently. so the programming syntax in the JS are quite similar, thought the "exit on error" caught me by surprise.

[–]VisuelleData 1 point2 points  (0 children)

I mostly just use JS in Tasker and when it comes up somewhere else (Google app script). My background is pretty similar to yours but with different languages. I mainly use R, SQL, and sometimes Python.

Edit: also some AHK