regards
Lukas
var endTime, intvl;
function OnStart()
{
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
txt = app.CreateText( "");
txt.SetTextSize( 32 );
lay.AddChild( txt );
app.AddLayout( lay );
var seconds = 10
endTime = Date.now()+1000 * seconds;
showTime();
intvl = setInterval(showTime, 300);
}
function showTime()
{
var tim = Date.now();
var diff = Math.round((endTime - tim)/1000);
if(diff < 1)
{
diff =0;
clearInterval(intvl);
}
txt.SetText( diff );
}Lukas,
We are happy to help but you are not completely new to DroidScript.
You really should try these things yourself then post any difficulties you are having.
Did you try searching the group before posting?
I know, I'm using about 1 and an half year the DroidScript.
I've got bad Interet Connection, so I cant seach at the Forum.
I dont know how to code this because, I never need that before.
Best regards
Lukas
https://plugins.justplayer.de/
It also has an excellent sample program.
Plugin can also uninstall itself if not needed anymore.