User Tools

Site Tools


Privacy Policy


Version 2.50 is out since Jan 1st 2022

Frequently Asked Questions


Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax


This is an old revision of the document!

DroidScript Console

Execute your droidscript commands directly from this app.
Here is the spk.

//Called when application is started.
function OnStart()
	//Create a layout with objects vertically centered.
	lay = app.CreateLayout( "linear", "TopCenter,FillXY" );	
	//Create a text label and add it to layout.
	txt = app.CreateText( "Droidscript Console" );
	txt.SetTextSize( 20 );
	lay.AddChild( txt );
	//Create Text Edit
	edt = app.CreateTextEdit("Start here: ",1,.96,"NoSpell" )
	edt.SetBackColor( "#000000" );
	edt.SetTextSize(13 );
        edt.SetOnEnter( clc );
	//Add layout to app.	
	app.AddLayout( lay );
function clc(){
var t = edt.GetText()
var p = edt.GetCursorPos();;
edt.SetText(t+"\n"+run(t.slice(t.lastIndexOf(":")+1,t.length))+"\n"+"start here: " );
edt.SetCursorPos(t.length );
edt.SetText(t+"\n"+e+"\n"+"start here: " );
edt.SetCursorPos(t.length );
function run(fn) {
  return new Function
('return ' + fn)();
//Get properties and methods
function prop(objectname){
this.s =""
this.a =0
		for(x in objectname){
    this.s+=a+" "+x+"\n\n"+objectname[x]+"\n\n\n\n"
   return this.s

Home»Sample Code

sample_code/droidscript_console.1472846142.txt.gz · Last modified: 2016/09/03 03:55 (external edit)