1 //----------------------------------------------------------------------
2 // JavaScript Library to utilize eventSender conveniently
4 function mouseMoveToElem(element
, pos
) {
5 var x
= element
.offsetLeft
;
6 var y
= element
.offsetTop
+ element
.offsetHeight
/ 2;
9 x
+= element
.offsetWidth
/ 4;
10 else if (pos
== 'right')
11 x
+= element
.offsetWidth
* 3 / 4;
13 x
+= element
.offsetWidth
/ 2;
15 eventSender
.mouseMoveTo(x
, y
);
18 function dragFromTo(elementFrom
, elementTo
) {
19 mouseMoveToElem(elementFrom
, 'left');
20 eventSender
.mouseDown();
21 mouseMoveToElem(elementTo
, 'right');
22 eventSender
.mouseUp();