0

Here is a code I have tried:

while sleep 3600; do xdotool mousemove xxx yyy click --repeat 30 --delay 60000 1; done
  • --clearmodifiers - reset active modifiers (alt, etc) while typing
  • --window WINDOW - specify a window to send click to
  • --repeat REPEATS - number of times times to click. Default is 1
  • --delay MILLISECONDS - delay in milliseconds between clicks.

    This has no effect if you do not use --repeat. Default is 100ms

So what I am looking for is 30 clicks each delayed by 60 seconds then for the whole process to start again in an hour. When I enter this into terminal flags are not recognized. --repeat nor --delay

luthermarcus
  • 11
  • 1
  • 2
  • I'm familiar with parts of `xdotool`, but not `--repeat`. What does this code do exactly? Is it not what you're looking for? Please [edit] to clarify. By the way, welcome to Ask Ubuntu! – wjandrea Sep 28 '18 at 22:28
  • Possible duplicate of [Repeat a command every x interval of time in terminal?](https://askubuntu.com/q/430382/301745) – wjandrea Sep 28 '18 at 22:35
  • Edited it. it it was just what i attempted for what i was trying to do. what do you suggest? – luthermarcus Sep 28 '18 at 23:03
  • Why are you editing your question to remove formatting? It's very difficult to read without formatting. – Kristopher Ives Sep 29 '18 at 00:04
  • This question has been modified many times. Each edit removes formatting and changes the overall scope of the question making it very difficult to work with. – Kristopher Ives Sep 29 '18 at 01:34
  • I fixed it now. I was doing a couple things at once. Do you know why the flags I'm using arent being recognized. – luthermarcus Sep 29 '18 at 02:02

1 Answers1

0

Your script looks mostly correct, but the --delay is in millseconds not seconds, and it appears this option actually controls the delay in between repeats. You can use sleep 60s instead to delay the initial click.

--delay MILLISECONDS
    Specify how long, in milliseconds, to delay between clicks. This option is not
    used if the --repeat flag is set to 1 (default).
Kristopher Ives
  • 5,419
  • 2
  • 27
  • 36