now browsing by tag
The launcher got stuck when I executed a script setting the eventhandler “resumed” of the current desktop.
Colin
]]>2 suggestions:
1: Could you add an event listener available for use with scripting to containers, which fires when a new item is added to that container. May not be a lot of use without scripts, but I could definitely think of some ways it would be useful with scripting.
2: I might have missed something, but I couldn’t find a straight forward way to get to know the default width and height of items that are new on in a container. This could be very useful when scripting too.
I really appreciate your hard work on this launcher!
Colin
]]>Hi, could you add scripting support for copying items?
Thanks for a great launcher!
Colin
]]>If anyone else wants a script to automatically import modified .js files elsewhere on your device into the script…
var scriptFolder = “/storage/emulated/0/LightningLauncher/script”;
LL.bindClass(“java.lang.StringBuilder”)
LL.bindClass(“java.io.FileReader”)
LL.bindClass(“java.io.BufferedReader”)
LL.bindClass(“java.io.File”)
LL.bindClass(“java.text.SimpleDateFormat”)
scriptNames = []
folder = new File(scriptFolder)
files = folder.listFiles()
for(i=0;i name = files[i].getName() length = name.length if(name.substring(length-3,length)==”.js”){ scriptNames[scriptNames.length] = name } } for(i=0;i var script=LL.getScriptByName(scriptNames[i].substring(0,scriptNames[i].length-3)); file = new File(scriptFolder,scriptNames[i]) lmdate = file.lastModified() tagdate = script.getTag(“lmdate”) if(lmdate>tagdate||typeof tagdate == “undefined”){ text = new StringBuilder(); try { br = new BufferedReader(new FileReader(file)); var line while ((line = br.readLine()) != null) { text.append(line); text.append(‘\n’); } br.close(); script.setText(text); date = new Date() script.setTag(“lmdate”,date.getTime()) } catch (err) { throw(err) } } }