-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Document
-
Click
Recordbutton to start recording -
Do anything like clicking mouse or tapping keyboard, which will be recorded
-
Click
Finishbutton to stop recording -
Click
Launchbutton to reproduce the operation recorded in step 2
usage: KeymouseGo.py [-h] [-rt RUNTIMES] [-sp SPEED] [-m MODULE]
sctipts [sctipts ...]
positional arguments:
sctipts Path for the scripts
optional arguments:
-h, --help show this help message and exit
-rt RUNTIMES, --runtimes RUNTIMES
Run times for the script
-sp SPEED, --speed SPEED
Run speed for the script, input in percentage form
-m MODULE, --module MODULE
Extension for the program
Run specific script
> KeymouseGo.exe scripts/0314_1452.txt
Run specific script for 3 times
> KeymouseGo.exe scripts/0314_1452.txt -rt 3
> KeymouseGo.exe scripts/0314_1452.txt --runtimes 3
Run specific script at the speed of 200%
> KeymouseGo.exe scripts/0314_1452.txt -sp 200
> KeymouseGo.exe scripts/0314_1452.txt --speed 200
Run specific script with extension MyExtension
> KeymouseGo.exe scripts/0314_1452.txt -m MyExtension
> KeymouseGo.exe scripts/0314_1452.txt --module MyExtension
-
The program will endlessly run the script if run times is set to
0 -
The default launch hotkey is
F6, which functions the same as the launching button. The default stop hotkey isF9, which will terminate the running script -
Only mouse click operation and keyboard operation will be recorded. Mouse trail won't be recorded.
-
A new script file will be generated in directory
scriptsat the end of recording. -
You can choose the script to run in choice list.
-
The content of script can be edited with reference of
Grammar of script. -
In hotkey setting,
Middlerefers mouse middle button andXButtonrefers mouse side button. -
Due to the limitation of execution speed, the running speed cannot be set too high.
In some system environment, there may be circumstances that the mouse events cannot be fully recorded. To settle this, you can run this program as administrator.
Assume that the resolution of screen is
1920 * 1080
[
[3000, "EM", "mouse right down", [0.05208%, 0.1852%]], // Press mouse right button at the relative coordinates `(0.05208, 0.1852)`(i.e. absolute coordinates `(100,200)`) after 3000ms
[50, "EM", "mouse right up", [0.05208%, 0.1852%]], // Release mouse right button at the coordinates after 50ms
[1000, "EK", "key down", (70, 'F', 0)], // Press key 'f' after 1000ms
[50, "EK", "key up", (70, 'F', 0)], // Release key 'f' after 50ms
[100, "EM", "mouse left down", [0.2604%, 0.4630%]], // Press mouse left button at the relative coordinates `(0.2604, 0.4630)`(i.e. absolute coordinates `(500,500)`) after 100ms
[100, "EM", "mouse move", [0.2604%, 0.5556%]], // Move mouse to the relative coordinates `(0.2604, 0.4630)`(i.e. absolute coordinates `(500,500)`) after 100ms
[100, "EM", "mouse left up", [0.3125%, 0.5556%]], // Release mouse left button at the relative coordinates `(0.3125, 0.5556)`(i.e. absolute coordinates `(600,600)`) after 100ms
[100, "EX", "input", "Hello world"], // Input 'Hello world' at current coordinate after 100ms
]
The script is saved in json format, in which each line represents an operation
- The first element of each line is time interval(ms), indicating the interval to previous operation
- The second element of each line is operation type.
EMrepresents mouse,EKrepresents keyboard,EXrepresents extended operation - The third element of each line is detailed operation type, including
-
mouse left down:press mouse left buttonmouse left uprelease mouse left button -
mouse right downpress mouse right buttonmouse right uprelease mouse right button -
mouse middle downpress mouse middle buttonmouse middle uprelease mouse middle button -
mouse wheel upmouse wheel slide upmouse wheel downmouse wheel slide down -
key downpress keykey uprelease key -
mouse movemove mouse toinputinput text
-
- The fourth element of each line is action type
- If operation type is
EM, it is consisted of coordinates of mouse.(Both relative coordinates and absolute coordinates are supported) - If operation type is
EK, it is consisted of coordinates of (key number, key name, extension flag) - If detailed operation type is
Input, it is the text to input
- If operation type is
- In each line, comment can be added after
// - It is recommended to back up script before editing. And make sure to follow the format while editing, otherwise it may result in failure of execution.