如何使鼠标每5秒自动点击一次?

杰吉

我想点击几个小时。如何制作脚本或使用应用程序,使鼠标每隔5秒或更短时间自动单击一次?

亚历山大·坎波斯

编辑: xdotool click --delay 5000 --repeat 200 1

用鼠标单击200次


打开终端,安装xdotool

sudo apt-get install xdotool

另外,打开要与终端并排单击的窗口。选择终端(作为活动窗口),然后将鼠标移到要单击的位置在终端类型中(尽量不要移动鼠标)

xdotool getmouselocation

您将需要x:XXX和y:YYY(底部)。您可以从此处移动鼠标,但让窗口保持原样。类型

gedit script

将以下内容粘贴到gedit上(将XXX和YYY更改为您之前获得的数字)

#!/bin/bash
while [ 1 ]; do
  xdotool mousemove XXX YYY click 1 &
  sleep 5
done

保存并关闭它。然后

chmod +x script

要执行它

./script

要获得更少的食物,只需将睡眠后5改变为更少。

来源:http : //manpages.ubuntu.com/manpages/lucid/man1/xdotool.1.htmlhttp://ubuntuforums.org/showthread.php?t=925217

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章