//-- Script 1
var winObj = FindWindow("", "Calculator");
if (winObj)
{
//Display( winObj.GetText() + " was Found!" );
winObj.SetForeground();
winObj.SetFocus();
var winBtn = winObj.FindChild("", "9");
if (winBtn)
{
//Display( winBtn.GetText() + " was Found!" );
winBtn.MouseHover();
winBtn = null;
winBtn = winObj.FindChild("", "0");
winBtn.MouseHover();
}
winObj.MouseLClick(15, 51, true);
}
else
Display( "Calculator was not found...");
//-- Script 2
var winObj = FindWindow("", "Calculator");
var ncount = 5;
if (winObj)
{
while ( ncount > 0)
{
winObj.SetForeground();
winObj.SetFocus();
var winCE = winObj.FindChild("", "CE");
var winEQ = winObj.FindChild("", "=");
var winAdd = winObj.FindChild("", "+");
var win0 = winObj.FindChild("", "0");
var win1 = winObj.FindChild("", "1");
var win2 = winObj.FindChild("", "2");
var win3 = winObj.FindChild("", "3");
var win4 = winObj.FindChild("", "4");
var win5 = winObj.FindChild("", "5");
var win6 = winObj.FindChild("", "6");
var win7 = winObj.FindChild("", "7");
var win8 = winObj.FindChild("", "8");
var win9 = winObj.FindChild("", "9");
winCE.MouseLClick(10, 10, true);
win1.MouseLClick(10, 10, true); // 1
win0.MouseLClick(10, 10, true); // 0
winAdd.MouseLClick(10, 10, true); // +
win9.MouseLClick(10, 10, true); // 9
win5.MouseLClick(10, 10, true); // 5
winEQ.MouseLClick(10, 10, true);
ncount--;
}
}
else
Display( "Calculator was not found...");
// script 3
var winObj = FindWindow("", "Calculator");
if (winObj)
{
//Display( winObj.GetText() + " was Found!" );
winObj.SetForeground();
winObj.SetFocus();
winObj.MouseLClick(430, 120, true);
SendKeys("(120+230)-50=");
}
// script 4
var winObj = FindWindow("Notepad", "Untitled - Notepad");
if (winObj)
{
winObj.SetForeground();
winObj.SetFocus();
SendKey(0x74); // F5
SendKeys("Ernest Laurentin\r");
SendKeys("1234567890-=\r");
SendKeys("!@#$%^&*()_+\r");
SendKeys("abcdefghijklmnopqrstuvwxyz\r");
SendKeys("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r");
}
else
Display("Untitled - Notepad window was not found...");