//Create a button 1/3 of screen width and 1/10 screen height.
btn = app.CreateButton("Press Me",0.3,0.1);
btn.SetMargins(0,0.05,0,0);
lay.AddChild( btn );
//Set function to call when button pressed.
btn.SetOnTouch( btn_OnTouch );
//Add layout to app.
app.AddLayout( lay );
}
//Called when user touches our button.
function btn_OnTouch()
{
//Show a popup message.
date =newDate();
app.ScreenShot("sdcard/"+ date +".png");
app.ShowPopup( date);
}
Funksiyani ishga tushirish juda oddiy "app.ScreenShoot("sdcard/test.png", 90);
orqali screenshot qilish mumkin.
*- bu yerda 90(bu rasm sifati, uni hoxlagancha qoyishingiz mumkin.Masalan, 70,80,100