DroidScript wiki

(was AndroidScript) unofficial documentation by the community

User Tools

Site Tools


Privacy Policy


Version1.42 is out since December 2nd 2016

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!

File Hex Viewer

Sample code

//Called when application is started.
function OnStart()
    var path="/sdcard/DroidScript/Hello World/Img/Hello World.png"
    //Create a layout with objects vertically centered.
    var lay = app.CreateLayout( "linear", "Left" );       //Create a full screen scroller 
    var scroll = app.CreateScroller( 1.0, 0.95 ); 
    lay.AddChild( scroll ); 
    //Create a layout inside scroller. 
    var layScroll = app.CreateLayout( "Linear", "Left" ); 
    scroll.AddChild( layScroll ); 
    var view=app.CreateWebView(1.5,0.95);
    //Add layout to app.    
    app.AddLayout( lay );
function hexView(fullPath,webView)
  var file = app.CreateFile( fullPath, "r" );
  var len = file.GetLength(); 
  var bull="•";
  var html="<p>"+fullPath+"</p><table>\n";
  var int,hex,asc,hbuff,abuff,row,pos=0;
  file.Seek( 0 );
  var whole = file.ReadData( len,"int" );
    var data = whole.slice(0,8);
    //var data = file.ReadData( 8,"int" );
    if(data==undefined) break;
    len = data.length;
    var pos8="<td>"+
      pos.toString(16)).slice(-8).toUpperCase() +
    for(var i=0;i<len;i++)
      if(int>31 && int<127)
    html +=row+"\n";
  while(len > 0);
sample_code/hexview.1436770525.txt.gz · Last modified: 2015/07/13 06:55 by stevegarman