User Tools

Site Tools


script_export_scripts

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

====== About the script ====== * Purpose : This script will export all your scripts to external storage/LightningLauncher/Scripts into text files * Author : [[https://plus.google.com/+LukasMorawietz|LM13]] * Current Version : 1.0 * Link : ====== Changelog ====== * Version 1.0 (14/9/2014): initial release in wiki ====== How to use the script ====== * Run from anywhere ====== Issues and Hints ====== * If you connect your device to pc using MTP and for some Filemanager you have to restart your phone to see the files. //please report all bugs in the g+ community!// ====== Script ====== <sxh javascript;>//import Java Classes LL.bindClass("java.io.FileWriter"); LL.bindClass("java.io.File"); LL.bindClass("android.os.Environment"); //Directory to save scripts in var dir=new File(Environment.getExternalStorageDirectory()+File.separator+"LightningLauncher"+File.separator+"Scripts"+File.separator); dir.mkdirs();//create Directory if missing //Iterate through all scripts var scripts=LL.getAllScriptMatching(Script.FLAG_ALL); for(var a=0;a<scripts.length;a++) { var s=scripts.getAt(a); var file=new File(Environment.getExternalStorageDirectory()+File.separator+"LightningLauncher"+File.separator+"Scripts"+File.separator+s.getName()+".txt");//Define the file to save in file.createNewFile();//create the file //write the code to the file var f=new FileWriter(file); f.write(s.getText()); f.flush(); f.close(); } </sxh>

script_export_scripts.1410703265.txt.gz · Last modified: 2014/09/14 14:01 by lm13