ubuntu下模拟鼠标点击【转自CSND】
ubuntu下安装xdotool
输入以下命令:
sudo apt-get install xdotool
若干基本用法:
1、将鼠标移动到在屏幕上特定的X和Y坐标位置
xdotool mousemove x y
2、点击鼠标左键,1表示左键,2表示中键,3表示右键。
xdotool click 1
3、同时按下ctrl和l键
xdotool key ctrl+l
4、如果要鼠标每隔 10 秒点击左键一次, 我们可以用终端下的 watch 命令组合实现
xwatch -n 10 xdotool click 1
更多命令详解请输入:
manxdotool
THE END