Small command line tool based on robotjs used to automate simple tasks (click something, type something, wait). Mainly for when you want to do something at a certain time, but you aren't near your PC.
$ contempt [...commands]
# or
$ npx contempt [...commands]
Clicks where the cursor is located.
$ contempt click
Right clicks where the cursor is located.
$ contempt rightclick
Types the given text. Use "__" as spaces.
type:[text]
$ contempt type:hello__world
Presses the given key.
key:[key],[modifier]
[modifier] accepts alt, command (win), control, and shift
$ contempt key:f5
$ contempt key:t,control
Waits for the given amount of seconds.
wait:[seconds]
$ contempt wait:5 click
Moves the cursor to the given coordinates.
move:[x],[y]
$ contempt move:100,100
Prints the current mouse position, utility to help you build your commands.
$ contempt wait:3 mousepos
$ contempt wait:5 click wait:5 click
$ contempt wait:2 type:Hello__World! key:enter
$ contempt wait:3 key:t,control wait:1 type:google.com key:enter wait:4 type:contempt wait:1 key:enter
You can also use a file to store your commands, just pass the -i
flag and the path to the file.
$ contempt -i ./commands.txt
# This is a comment
WAIT 1
KEY command
TYPE npp
KEY enter
WAIT 1
KEY n control
TYPE I used to be an adventurer like you, but then I took an arrow in the knee.