Created
December 2, 2022 22:06
-
-
Save tinylinden/ec7696b8d87c9094198650555a89c661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
import java.awt.*; | |
import java.util.concurrent.*; | |
object Jiggler : Runnable { | |
private val robot: Robot = Robot() | |
override fun run() = | |
with (MouseInfo.getPointerInfo().getLocation()) { | |
robot.mouseMove(x, y) | |
} | |
} | |
fun main() { | |
Executors | |
.newSingleThreadScheduledExecutor() | |
.scheduleAtFixedRate(Jiggler, 0, 42, TimeUnit.SECONDS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment