R.M. Levitt
unread,Sep 7, 2018, 6:09:23 AM9/7/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tasker
The play button on the Javascriptlet gives an “OK" toast and I'm not seeing any errors, but the scriptlet simply will not change the value of a variable I have defined in Tasker no matter what I do. This is what I have:
A1: Variable Set
Name %testVar To foo
A2: Javascriptlet
var testVar = "bar";
flash(testVar);
A3: Popup Text %testVar
The Javascript flash says "bar" but the Tasker popup (A3) still says "foo" as if my scriptlet did nothing. The scriptlet Auto Exit is set to true and the Timeout is set to 45 seconds. I've also tried this Javascript:
var a = global('testVar');
a = "bar";
flash(a);
tk.setLocal('testVar', a);
Again, the Javascript flash says "bar" but the Tasker Popup (A3) still reports %testVar as "foo". Even these two attempts did nothing:
1) var testVar = "bar";
2) tk.setLocal('testVar', "bar");
In every one of these cases, the Tasker variable %testVar is still "foo" in the Popup (A3) just after the scriptlet, the same value I initially set for it in A1 just PRIOR to the scriptlet (A2). What in the world could I possibly be doing wrong? Why won't the Javascript change the value of %testVar??