Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 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