Jump to content

Simulate input/Mouse: Difference between revisions

Scala added
(Added zkl)
(Scala added)
Line 175:
 
click()</lang>
 
=={{header|Scala}}==
[[Category:Scala Implementations]]
{{libheader|Scala}}
<lang Scala> val (p , robot)= (component.location, new Robot())
robot.mouseMove(p.getX().toInt, p.getY().toInt) //you may want to move a few pixels closer to the center by adding to these values
robot.mousePress(InputEvent.BUTTON1_MASK) //BUTTON1_MASK is the left button
robot.mouseRelease(InputEvent.BUTTON1_MASK)</lang>
 
=={{header|Tcl}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.