Table of Contents

StartProgram

The StartProgram function starts an NXT-G program (.rxe file) on the NXT brick (if the program is available on the brick). Format for program: ASCIIZ string with maximum size [15:3 chars].

Note: This function will also launch .rso sound files

nxt.StartProgram( program );

Example - Start a program

function OnStart()
{
  nxt = app.CreateNxt();
  app.SetMenu( "Connect,Start Program" );
}
 
function OnMenu( name )
{
  if( name=="Connect" )
    nxt.ShowDevices();
  else if( name=="Start Program" )
    nxt.StartProgram( "Program1.rxe" );
}