Yes, you are right. But in this case you first have to declare the variable in Tasker. So, you task will be:
Date2 (419)
A1: Variable Set [ Name:%res To:0 Do Maths:Off Append:Off ]
A2: JavaScriptlet [ Code:function myresult() {
date = new Date();
d = date.getDate();
m = date.getMonth() + 1;
y = date.getFullYear();
}
myresult()
res = d + "-" + m + "-" + y; Libraries: Auto Exit:On Timeout (Seconds):45 ]
A3: Flash [ Text:%res Long:On ]
Il 28/Mar/2015 14:26 "Danielo515" <rdan...@gmail.com> ha scritto:
>
> If you are using a javascriptlet you don't need to use the setLocal thing. Just declare the variable inside the javascript code and it will be available on Tasker as a local variable automatically. Use all lowercase letters or it will not work. This is simpler than you are doing!
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/EbVgNQUTs30/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
> Visit this group at http://groups.google.com/group/tasker.
> For more options, visit https://groups.google.com/d/optout.