Help with script

Help with script

Hi, I am using LL and it’s wonderful.

I am tryng to use some of the scripts that are on the repository but – when I try to run them – I get the error

At line ##: missing ; after for-loop condition.

It happens with all the scripts I’ve tried. 

Maybe I didn’t understang something about using the script

Thanks

]]>

15 Commentsto Help with script

  1. Anonymous says:

    < ![CDATA[

    Maybe a copy/paste issue ? Did you try with the Repository Importer tool ?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    which script did you try?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    I use the repository importer app.


    I dude is a copy/paste problem because it occurred with five different scripts


    Thanks

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Put desktop shortcuts in a circle


    Make a rotating app wheel


    Customizable wheel of items


    Make Containers scroll simultaneous


    Holes

    ]]>

  5. Anonymous says:

    < ![CDATA[

    I just tried Holes, and no error for me.


    Make sure that the imported script (from the script editor) is visually the same and doesn’t have any bad characters.


    Also make sure it has line breaks, the most probably is that your script has no line breaks

    ]]>

  6. Anonymous says:

    < ![CDATA[

    I’ll try

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Still not working


    the error is every time in a line that has only the character


    {

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Vittorio Scelzo show us a screenshot please


    And a screenshot with the script open after the error

    ]]>

  9. Anonymous says:

    < ![CDATA[

    I have the same thing, for instance the Always Top Indicator script doesn’t import line 55


    (line 2 here) i thought it stopped after the if((cy


    when copied by hand the error is gone.



    var ny;


    if((cy< =iy&&t!=0)||inactive||reset){


    //set the item in their position


    ny=iy;


    }else{


    //set the item above the previous one


    var o=item.getHeight()-last;


    ny=cy-(o>0?o:0);


    }


     


    i thought it was a problem on my end, because i am between switching from my old to new phone and having some other issues with the old one. 



    But apparently i’am not the only one

    ]]>

  10. Anonymous says:

    < ![CDATA[

    But is the whole script removed after that line or only that line?


    In the preview pop-up when you click the search and import button, but before importing it, is it also cut?

    ]]>

  11. Anonymous says:

    < ![CDATA[

    only that line, in the importer the line isnt there. 


    In the Script Multi Tool the part for scripts is also gone, but it does start, is this correct?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    screenshot:


    https://drive.google.com/open?id=0B2Gltk_LlAG4d3hJYmp5REk3t:




    And this is the complete text of the import:


    //Flags: 


    //Name: Always top indicator


    /* About the script 


     *  Purpose : This is a script that places an item as an indicator always on top, that is replaced by the next one when reached. 


     *  Author : TrianguloY 


     *  Link: https://plus.google.com/u/1/105066926163073195690/posts/CR2Mj15DTLe (with video)


     */



    //Indicators by +TrianguloY



    /*Reminder:


    the items need to be labeled “indicator 0” “indicator 1” “indicator 2” …



    Unzoom (or zoom) to move all indicators to their original positions, then you can edit easily.



    Running the script in the container (save all) or item (save that item) to force a save of the position of the indicator. Use this after modifying manually one. (not necessary with newly created ones)



    Set the AUTOREFRESH to true if you have a lot of indicators and it lags a bit. Keep in mind you will need to unzoom/force a save/restart the launcher to apply new changes


    */



    var AUTOREFRESH = true;









    var ev=LL.getEvent();


    var cont=ev.getContainer();



    var cy=cont.getPositionY();



    //flags


    var inactive=cont.getPositionScale()!=1;//to disable when zoom


    var reset=ev.getSource()!=”C_POSITION_CHANGED”;//to reset at desired



    var resetid=-1;


    if(reset&&ev.getItem()!=null){resetid=ev.getItem().getId();reset=false;}



    if(AUTOREFRESH||reset||resetid!=-1||!(“indicator_items” in this)){


    //create the array of indicators (indicator_items)


    indicator_items=[];


    var l=0;


    while(true){


    var p=cont.getItemByName(“indicator “+l);


    if(p==null)break;


    indicator_items[l++]=p;


    }



    }



    //asignating position


    var last=Math.infinity;


    for(var t=indicator_items.length-1;t>=0;–t){



    var item=indicator_items[t];



    var iy=getiy(item);




    var ny;


    if((cy


    //set the item in their position


    ny=iy;


    }else{


    //set the item above the previous one


    var o=item.getHeight()-last;


    ny=cy-(o>0?o:0);


    }



    //set and save


    item.setPosition(item.getPositionX(),ny);


    last=ny-cy;


    }





    function getiy(item){


    //get the saved tag, otherwise, prepare the item;


    var d=item.getTag(“indicator”);



    if(d!=null && !reset && resetid!=item.getId())return parseInt(d);



    //if no tag found or reset active


    d=item.getPositionY();


    item.setTag(“indicator”,d);


    item.getProperties().edit().setBoolean(“i.onGrid”,false).commit();//properties set


    return d;


    }

    ]]>

  13. Anonymous says:

    < ![CDATA[

    It seems to remove the ‘< ' character, mostly found on for loops.


    Hmm, something related to the conversion between the html page and the normal string. But why it works on other devices?



    Question: while looking at the page with the script in the repository app, is the script colorful or normal text?


    Also, is the script cut there too? 

    ]]>

Leave a Reply

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