Fast run

Fast run

This script is a little tool for those who want to launch short (or long) scripts in an easy way, without need to write a new one, launch it, forget to delete it…

This script will let you write/paste a script and run it directly from the eval javascript feature.

Features:

– Automatically save the last executed script

– Custom predefined vars: e-event, c-container, i-item (of the event)

– custom function: Toast(string)

IMPORTANT!

Since it uses the eval function, you can’t use alert,prompt or confirm. That’s why I made the Toast one. (Timeouts work)

Any suggestion will be greatly appreciated 🙂

————————————-

/*Available vars */

var e = LL.getEvent();

var c = e.getContainer();

var i = e.getItem();

var text = LL.getScriptTag() || “”;

var out = prompt(“Functions:  Toast(string);\nVars: e-event, c-container, i-item\n\nPrevious input: \n”+text+”\n_________________________________________________________”,text);

//Change this ‘line’ if you want

if(out!=null) {

    LL.setScriptTag(out);

    eval(out);

}

/*available functions */

function Toast(say){Android.makeNewToast(say,false).show();}

]]>

Leave a Reply

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