TrianguloY : just missing how to display Network operator and wifi network
TrianguloY : just missing how to display Network operator and wifi network
I have Xposed and can add permissions using Lukas Morawietz ‘s module
]]>« I’m not a friend of tasker. (Previous Post)
< ![CDATA[
TrianguloY Day number is not changing
Isn’t it an instruction missing ?
Like
var unused=$ll_day_of_month;
]]>
< ![CDATA[
Hmm, didn’t I wrote it? Ouch
var unused=$ll_day; should work
]]>
< ![CDATA[
TrianguloY day or day_of_month here ?
About the day number
Day name is fine
]]>
< ![CDATA[
$ll_day
$ll_day_of_month doesn’t exist
]]>
< ![CDATA[
TrianguloY I’ve set day_of_month
No error. We’ll see tomorrow
]]>
< ![CDATA[
It won’t update
Using $ll_day_of_month is the same as using $blablabla, I mean, that doesn’t exists (its value is null) and lighting won’t update it.
]]>
< ![CDATA[
TrianguloY ok I’m changing
]]>
< ![CDATA[
🙂
Also, did you used a monospace font?
If you did you probably lost the special character when copy pasteing. That’s why the last line is not aligned. Search for ‘no break space character’ and place it in the nbs variable.
]]>
< ![CDATA[
TrianguloY probably I’ve lost the special char
I can’t see it on your posting
]]>
< ![CDATA[
Because visually is the same as a space 😉
You have it here ” “
]]>
< ![CDATA[
TrianguloY yes
So how to set this char ?
I see nothing on your post
]]>
< ![CDATA[
Because visually is the same as a space!!
Just copy the comment, take the character between the “, and set it in your script.
The character may look a space but it is not!!!!
If you still are confused, try this app: https://play.google.com/store/apps/details?id=jp.ddo.hotmist.unicodepad
]]>
< ![CDATA[
Hi, I was trying to get the day of the month also.
var unused=$ll_day_name;
var days=[“1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”10″,”11″,”12″,”13″,”14″,”15″,”16″,”17″,”18″,”19″,”20″,”21″,”22″,”23″,”24″,”25″,”26″,”27″,”28″,”29″,”30″,”31”];
var now=new Date().getDate();
days[now]=”“+days[now]+”“;
return days.join(” “);
I Adapted it to this, but it’s returning 19 instead of 18. What can I do to make it work?
]]>
< ![CDATA[
…
var days=[“”,”1″,”2″,
…
]]>
< ![CDATA[
TrianguloY
Thanks, I was thinking in that direction but it could not be zero. But Blank works.
]]>
< ![CDATA[
Evelien Wijbenga instead of using that, did you saw the one I wrote in the previous Bruno’s comment?
]]>
< ![CDATA[
about the char you mean. I did not know where to place it. But that’s probably because I tried to adapt it myself, and I do not know scripting. So the most simple stuff is not obvious to me.
]]>
< ![CDATA[
This is the script with a # instead of the no break space.
Test it and you will see how it works.
Then replace the # with that ‘no break space’ character.
Try this:
(Use a mono space font)
var unused=$ll_day;
LL.bindClass(“java.util.Calendar”);
var nbs=”#”;//No break space, not a normal space character
var cal=Calendar.getInstance();
var day=cal.get(Calendar.DAY_OF_MONTH);
var week=cal.get(Calendar.DAY_OF_WEEK)-1;
var offset=(36-day+week)%7;
var max=cal.getActualMaximum(Calendar.DAY_OF_MONTH);
var s=””;
for(var i=0;i
for(var i=1;i< =max;++i){
if(i==day)s+=”“;
s+=nbs+(i<10?"0"+i:i);
if(i==day)s+=”“;
offset=(offset+1)%7;
if(offset==0)s+=”
\n”;
}
while(offset++<7)s+=nbs+nbs+nbs;
return s;
]]>
< ![CDATA[
Cool. Thanks.
]]>
< ![CDATA[
WOW, did I cause all of this? 😉
]]>
< ![CDATA[
Jappie Toutenhoofd yes.
Many thanks Jappie 😊
]]>
< ![CDATA[
Bruno-Isa LAMOUR-ARNOULD. Sorry for not answering before
… Searching …
Hmm, the answer was way easier than I though, try this (you will need Wi-Fi access permission for the second one)
Also remember that, if you want to use them in bindings, you need something to refresh them.
LL.getContext().getSystemService(LL.getContext().TELEPHONY_SERVICE).getNetworkOperatorName();
LL.getContext().getSystemService(LL.getContext().WIFI_SERVICE).getConnectionInfo().getSSID()
]]>
< ![CDATA[
TrianguloY thank you
I’ll try it. How to refresh ? An unsed var ?
]]>
< ![CDATA[
I wrote it in another post answer… (newer than this post I think if you want to find it)
The bad but working way is to add the seconds variable as an unused one. This will update it every second, way too much.
Another idea is to have a custom variable, and change that variable when you want to refresh. I recommend to change it from the resumed event of your desktop, this way it is updated every time you go back to LL
]]>
< ![CDATA[
TrianguloY ok set in bindings with an unsed var 👍
]]>