BlueM / cliclick

macOS CLI tool for emulating mouse and keyboard events
https://www.bluem.net
Other
1.59k stars 116 forks source link

Line comment in program #147

Closed Spritekin closed 2 years ago

Spritekin commented 2 years ago

Just an idea... it would be nice to have a comment symbol so we can annotate the program for example:

# Click the title
m:1000,40
c:.
# Click the forward button
m:400,700
c:.
# Click the selection
m:1300,700
c:.
# Wait 2 seconds then Click the execute button
w:2000
m:800,700
c:.
# Wait 5 seconds then Click the finish button
w:5000
m:800,750
c:.

Nicer to read.

BlueM commented 2 years ago

Running cliclick -h shows, among other things:

  -f <file>   Instead of passing commands as arguments, you may instead
              specify a file from which cliclick will read the commands
              (or stdin, when - is given as filename).
              Each line in the file is expected to contain a command
              in the same format/syntax as commands given as arguments
              at the shell. Additionally, lines starting with the hash
              character # are regarded as comments, i.e.: ignored. Leading
              and trailing whitespace is ignored, too.

According to https://github.com/BlueM/cliclick/blame/94ec58220722128b3b950d6c31c1ce2d8e5eea6e/cliclick.m#L205 your example should have worked for years.

Spritekin commented 2 years ago

Right, sorry my mistake.