I have both these dynamic calendar scripts working separately in my app drawer, but when I tried making the new…

I have both these dynamic calendar scripts working separately in my app drawer, but when I tried making the new script suggested by TrianguloY​ by copying the script twice and editing where necessary, only the first script is applied, Here it is if anyone has any suggestions or can correct any error I may have made, thanks guys…

//go to the icon picker and search the 31 items. Long click the first one (it will be copied) and paste it here between the brackets

var link = [ “com.thaphlash.random”, “today_1” ]

//This is the label of the item to put the icon to

var labelName = “Today Settings”;

//write true to set the calendar based on the month. By default it’s false: based on the day

var month=false;

//end of config

if(link.length==0){alert(“follow the instructions and paste the icon properties in the script”);return;}

LL.bindClass(“java.util.Calendar”);

var now=Calendar.getInstance().get(month?Calendar.MONTH:Calendar.DAY_OF_MONTH);

if(month)now++;

//only when change, or run from item

if(now.toString()==LL.getScriptTag()&&LL.getEvent().getSource()!=”MENU_ITEM”)return;

LL.setScriptTag(now);

var iconPackName = link[0];

var prefixName = link[1].substring(0,link[1].length-1);

var item=LL.getEvent().getContainer().getItemByLabel(labelName);

if(item==null){alert(“no item found, make sure the label is the same as in the script”); return;}

var icon=LL.createImage(iconPackName,prefixName+now);

if(icon==null){alert(“no icon found, make sure the pasted data is right and the icon pack have it”);return;}

item.setCustomIcon(icon);//go to the icon picker and search the 31 items. Long click the first one (it will be copied) and paste it here between the brackets

var link = [ “com.thaphlash.random”, “calendar_1” ]

//This is the label of the item to put the icon to

var labelName = “Calendar”;

//write true to set the calendar based on the month. By default it’s false: based on the day

var month=false;

//end of config

if(link.length==0){alert(“follow the instructions and paste the icon properties in the script”);return;}

LL.bindClass(“java.util.Calendar”);

var now=Calendar.getInstance().get(month?Calendar.MONTH:Calendar.DAY_OF_MONTH);

if(month)now++;

//only when change, or run from item

if(now.toString()==LL.getScriptTag()&&LL.getEvent().getSource()!=”MENU_ITEM”)return;

LL.setScriptTag(now);

var iconPackName = link[0];

var prefixName = link[1].substring(0,link[1].length-1);

var item=LL.getEvent().getContainer().getItemByLabel(labelName);

if(item==null){alert(“no item found, make sure the label is the same as in the script”); return;}

var icon=LL.createImage(iconPackName,prefixName+now);

if(icon==null){alert(“no icon found, make sure the pasted data is right and the icon pack have it”);return;}

item.setCustomIcon(icon);

]]>

3 Commentsto I have both these dynamic calendar scripts working separately in my app drawer, but when I tried making the new…

  1. Anonymous says:

    < ![CDATA[

    Oh, yes. The problem is that, when it checks if the day hasn’t changed, the second time it always return true.



    Remove this lines of the second subscript where it says:


    //only when change, or … … … setScriptTag(now);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Awesome! Mission accomplished 😂.. Thanks TrianguloY​….. Yet again! and to the rest of the guys around here at LL, It’s a great community you have Pierre Hébert​

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Adam Caine WOW . Just wow

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *