1.1.0 • Published 2 years ago
contempt v1.1.0
Contempt
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.
Usage
$ contempt [...commands]
# or
$ npx contempt [...commands]Commands
click
Clicks where the cursor is located.
$ contempt clickrightclick
Right clicks where the cursor is located.
$ contempt rightclicktype
Types the given text. Use "__" as spaces.
type:[text]
$ contempt type:hello__worldkey
Presses the given key.
key:[key],[modifier]
modifier accepts alt, command (win), control, and shift
$ contempt key:f5
$ contempt key:t,controlwait
Waits for the given amount of seconds.
wait:[seconds]
$ contempt wait:5 clickmove
Moves the cursor to the given coordinates.
move:[x],[y]
$ contempt move:100,100mousepos
Prints the current mouse position, utility to help you build your commands.
$ contempt wait:3 mouseposExamples
Clicks twice, 5 seconds apart.
$ contempt wait:5 click wait:5 clickTypes "Hello World" and presses enter.
$ contempt wait:2 type:Hello__World! key:enterOpen Google and make a search
$ contempt wait:3 key:t,control wait:1 type:google.com key:enter wait:4 type:contempt wait:1 key:enterUsing a Input File
You can also use a file to store your commands, just pass the -i flag and the path to the file.
$ contempt -i ./commands.txtExample Input File
# 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.