Forum Discussion
karkadil
15 years agoValued Contributor
They are not functions, but properties of any onscreen object.
Here is an example. In this function we are performing drag-n-drop of the button "4" in Calculator Plus onto the button "6". Of course, the button will not be really moved since it can't be moved by design, but I believe you'll get the idea.
function DragDropDemo()
{
wCalc = Sys.Process("CalcPlus").Window("SciCalc", "Calculator Plus", 1);
wCalc.Activate();
btn4 = wCalc.Window("Button", "4");
btn6 = wCalc.Window("Button", "6");
deltaX = btn6.Left - btn4.Left;
btn4.Drag(btn4.Width/2, btn4.Height/2, deltaX, 0);
}
You should download Calculator Plus application from Microsoft download site if you'd like to run this function.
Here is an example. In this function we are performing drag-n-drop of the button "4" in Calculator Plus onto the button "6". Of course, the button will not be really moved since it can't be moved by design, but I believe you'll get the idea.
function DragDropDemo()
{
wCalc = Sys.Process("CalcPlus").Window("SciCalc", "Calculator Plus", 1);
wCalc.Activate();
btn4 = wCalc.Window("Button", "4");
btn6 = wCalc.Window("Button", "6");
deltaX = btn6.Left - btn4.Left;
btn4.Drag(btn4.Width/2, btn4.Height/2, deltaX, 0);
}
You should download Calculator Plus application from Microsoft download site if you'd like to run this function.