sudo apt-get install xdotool
sh 脚本.sh
捕获鼠标当前位置并循环点击
#!/bin/bash
while true
do
x=`xdotool getmouselocation | awk -F '[a-z]:+' '{printf $2}'`
y=`xdotool getmouselocation | awk -F '[a-z]:+' '{printf $3}'`
xdotool mousemove $x $y;xdotool click 1
sleep 3
done
#!/bin/bash
while true
do
x=1500
xx=2500
y=500
xdotool mousemove $x $y;xdotool click 1
sleep 3
xdotool mousemove $xx $y;xdotool click 1
sleep 3
done