September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,9 @@
|
|||
# Wrap win32 API function mouse_event() from the User32 dll.
|
||||
function mouse_event_wrapper(dwFlags,dx,dy,dwData,dwExtraInfo)
|
||||
ccall((:mouse_event, "User32"),stdcall,Void,(UInt32,UInt32,UInt32,UInt32,UInt),dwFlags,dx,dy,dwData,dwExtraInfo)
|
||||
end
|
||||
|
||||
function click()
|
||||
mouse_event_wrapper(0x2,0,0,0,0)
|
||||
mouse_event_wrapper(0x4,0,0,0,0)
|
||||
end
|
||||
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