doc tweak
This commit is contained in:
parent
4e6b6679d3
commit
30505d5b21
@ -84,7 +84,7 @@ interface TemporalController {
|
||||
*
|
||||
* @param duration The base sleep duration in ms
|
||||
* @param variance The amount of variance to add in ms. Gets divided in half
|
||||
* to generate random +/- values.
|
||||
* and rolled as two separate random numbers to create a normal distribution
|
||||
*/
|
||||
fun sleepWithVariance(duration: Long, variance: Long) {
|
||||
if (duration < 0 || variance <= 1) {
|
||||
@ -97,6 +97,25 @@ interface TemporalController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Data class to hold wiggle parameters for mouse movement.
|
||||
*
|
||||
* This simple data class holds two integer properties for x and y wiggle amounts.
|
||||
* These are used when generating simulated mouse movements to add some variance
|
||||
* and randomness to the coordinates.
|
||||
*
|
||||
* For example, if a target destination point is (100, 200), the wiggle params
|
||||
* might generate an actual movement point like (102, 198) to add some randomness.
|
||||
*
|
||||
* @param xWiggle The max amount of variance in x direction. Default 25.
|
||||
* @param yWiggle The max amount of variance in y direction. Default 25.
|
||||
*/
|
||||
data class WiggleParams(
|
||||
val xWiggle: Int = 25,
|
||||
val yWiggle: Int = 25
|
||||
)
|
||||
|
||||
|
||||
/**
|
||||
* Interface for controllers that interact with the desktop.
|
||||
*
|
||||
@ -169,33 +188,23 @@ interface DesktopController {
|
||||
*/
|
||||
interface Automaton : DesktopController, InputController, TemporalController
|
||||
|
||||
/**
|
||||
* Data class to hold wiggle parameters for mouse movement.
|
||||
*
|
||||
* This simple data class holds two integer properties for x and y wiggle amounts.
|
||||
* These are used when generating simulated mouse movements to add some variance
|
||||
* and randomness to the coordinates.
|
||||
*
|
||||
* For example, if a target destination point is (100, 200), the wiggle params
|
||||
* might generate an actual movement point like (102, 198) to add some randomness.
|
||||
*
|
||||
* @param xWiggle The max amount of variance in x direction. Default 25.
|
||||
* @param yWiggle The max amount of variance in y direction. Default 25.
|
||||
*/
|
||||
data class WiggleParams(
|
||||
val xWiggle: Int = 25,
|
||||
val yWiggle: Int = 25
|
||||
)
|
||||
|
||||
/**
|
||||
* Implementation of [DesktopInputController] using [java.awt.Robot].
|
||||
* Desktop automation controller using java.awt.Robot.
|
||||
*
|
||||
* This class implements desktop automation capabilities using the Robot
|
||||
* class from the AWT library. It provides methods for:
|
||||
* This provides mouse, keyboard, and timing control capabilities by
|
||||
* wrapping the java.awt.Robot class.
|
||||
*
|
||||
* - Getting mouse/pointer info
|
||||
* - Mouse and keyboard input
|
||||
* - Adding timing and delays
|
||||
* Key features:
|
||||
*
|
||||
* - Get current mouse/pointer location
|
||||
* - Move mouse and perform clicks
|
||||
* - Keyboard presses and hotkeys
|
||||
* - Scroll wheel motions
|
||||
* - Sleep/delay methods with variance
|
||||
*
|
||||
* RobotController aims to provide a simple and easy to use API for
|
||||
* automating desktop interactions and workflows.
|
||||
*
|
||||
* @param robot The Robot instance to use. A default is created if not provided.
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user