Get position of mouse:
Set controlObject = DotNetFactory.CreateInstance("System.Windows.Forms.Control")
currentX = controlObject.MousePosition.X
currentY = controlObject.MousePosition.Y
Debuggin DragAndDrop was tricky. I used DotNetFactory to get the mouse position. However, those co-ordinates dones't seemed to work when used in DragAndDrop method. Co-ordinate offset was the culpirt. Remember to try different offset when using such mehods.
Set DevRep = CreateObject( "Mercury.DeviceReplay" )
DevRep.DragAndDrop currentX +2, currentY+2, x + 190, y + 90, 0
Set controlObject = DotNetFactory.CreateInstance("System.Windows.Forms.Control")
currentX = controlObject.MousePosition.X
currentY = controlObject.MousePosition.Y
Debuggin DragAndDrop was tricky. I used DotNetFactory to get the mouse position. However, those co-ordinates dones't seemed to work when used in DragAndDrop method. Co-ordinate offset was the culpirt. Remember to try different offset when using such mehods.
Set DevRep = CreateObject( "Mercury.DeviceReplay" )
DevRep.DragAndDrop currentX +2, currentY+2, x + 190, y + 90, 0