Problem with mouse buttons
Posted: 16 Apr 2012, 13:54
My problem is that i don't really understand how this buttons work. I have this simple code:
But for some reason at key1.press("RightButton"); is still pressing left button. Would you explain to me where i am wrong please?
Code: Select all
Execution.pause(2000);
var key = new Keyboard();
var key1 = new Mouse();
var i=1;
var j=1;
var z=1;
for(i=1;i<=8;i++)
{
key.pressKey(i);
key.releaseKey(i);
for(j=1;j<=4;j++)
{
for(z=1;z<=400;z++)
{
key1.click();
Execution.pause(100);
}
key.pressKey(9);
key.releaseKey(9);
key1.press("RightButton");
Execution.pause(8000);
key1.release("RightButton");
Console.print(j);
key.pressKey(i);
key.releaseKey(i);
}
}