Any way to see and edit script on computer via sdcard?

Any way to see and edit script on computer via sdcard?

They could be placed in /storage/sdcard1/LightningLauncher/scripts/ for example!

]]>

8 Commentsto Any way to see and edit script on computer via sdcard?

  1. Anonymous says:

    < ![CDATA[

    I don’t use it myself but there is a hack: through the script editor, open a script with an external editor, and a script.js file is created in /your_external_storage/LightningLauncher/tmp. You can these access this file using a network share (ftp, smb).


    When you leave the external editor, the script will be replaced with the content of this script.js file.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    It would be better (i think) if the scripts can be on the sdcard, so we could code on computer (for example) or have a better access to them…



    Other features are needed in the script editor, like a Settings Activity, with options like :


    – line number


    – font


    font size


    – a better code-completion, which doesn’t hide the code we are writing ^^


    – a code-completion for our variables

    ]]>

  3. Anonymous says:

    < ![CDATA[

    /your_external_storage/ IS /storage/sdcard1/


    But I agree with Benoît de Chezelles the extra mile for apk could have been /your_external_storage/LightningLauncher/js/ {sorry Pierre Hébert , I know you aim much further}

    ]]>

  4. Anonymous says:

    < ![CDATA[

    +Jappie Toutenhoofd Yes I know it’s /storage/sdcard1/ ! But the scripts aren’t stored there! We can use the hack mentioned by Pierre, but it’s not fully functional…

    ]]>

  5. Anonymous says:

    < ![CDATA[

    I’ve written a script for that. However you have to restart your phone after executing it and before connecting it to pc if you connect via MTP.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    LL.bindClass(“java.io.FileWriter”); LL.bindClass(“java.io.File”); LL.bindClass(“android.os.Environment”);


    //LL.bindClass(“android.media.MediaScannerConnection”);


    var dir=new File(Environment.getExternalStorageDirectory()+File.separator+ “LightningLauncher”+File.separator+”Scripts”+File.separator);


    dir.mkdirs();


    //MediaScannerConnection.scanFile(LL.getContext(),[dir.getAbsolutePath()],[“*/*”],null);


    var scripts=LL.getAllScriptMatching(Script.FLAG_ALL);


    for(var a=0;a


    {


    var s=scripts.getAt(a);


    if(s.getId()==LL.getCurrentScript().getId())continue;


    var file = new File(Environment.getExternalStorageDirectory()+File.separator+ “LightningLauncher”+File.separator+”Scripts”+File.separator+s.getName()+”.txt”); file.createNewFile();


    var f=new FileWriter(file);


    f.write(s.getText());


    f.flush();


    f.close();


    //MediaScannerConnection.scanFile(LL.getContext(),[file.getAbsolutePath()],[“*/*”],null);


    }

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Can you explain what your code is doing exactly? And how to use it?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    How to use is easy: copy/paste and run from anywhere 😀



    This script takes the code of every script and dumps it into a textfile in LightningLauncher/Scripts named like the script


    (And outcommented ATM an experimental MediaScanning to fix the reboot required for MTP devices)

    ]]>

Leave a Reply

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