Load a saved boolean value to remember varibale values between multiple app starts.
Example - Detect First Start
var file = "demofile";
function OnStart()
{
var first = app.LoadBoolean( "first", true, file );
if(first)
app.ShowPopup( "You ran this demo for the first time!" );
else
app.ShowPopup( "This is not the first time you have run this demo." );
app.SaveBoolean( "first", false, file );
}
file = "demofile"
def OnStart():
first = app.LoadBoolean( "first", true, file )
if first:
app.ShowPopup( "You ran this demo for the first time!" )
else:
app.ShowPopup( "This is not the first time you have run this demo." )
app.SaveBoolean( "first", false, file )