Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Simulate-input-Mouse/Kotlin/simulate-input-mouse.kotlin
Normal file
14
Task/Simulate-input-Mouse/Kotlin/simulate-input-mouse.kotlin
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// version 1.1.2
|
||||
|
||||
import java.awt.Robot
|
||||
import java.awt.event.InputEvent
|
||||
|
||||
fun sendClick(buttons: Int) {
|
||||
val r = Robot()
|
||||
r.mousePress(buttons)
|
||||
r.mouseRelease(buttons)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
sendClick(InputEvent.BUTTON3_DOWN_MASK) // simulate a click of the mouse's right button
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue