September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,21 @@
|
|||
// version 1.1.2
|
||||
|
||||
import java.awt.Robot
|
||||
import java.awt.event.KeyEvent
|
||||
|
||||
fun sendChars(s: String, pressReturn: Boolean = true) {
|
||||
val r = Robot()
|
||||
for (c in s) {
|
||||
val ci = c.toUpperCase().toInt()
|
||||
r.keyPress(ci)
|
||||
r.keyRelease(ci)
|
||||
}
|
||||
if (pressReturn) {
|
||||
r.keyPress(KeyEvent.VK_ENTER)
|
||||
r.keyRelease(KeyEvent.VK_ENTER)
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
sendChars("dir") // runs 'dir' command
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue