(Information and examples taken from the DroidScript documentation)
The IsScreenOn method returns true if the device screen is turned on and false if not.
app.IsScreenOn();
function OnStart() { screenOn = app.IsScreenOn(); app.ShowPopup( screenOn ); }