Ubuntu下安裝方法
輸入以下命令:
sudo apt-get install xdotool
軟件首頁:http://www.semicomplete.com/projects/xdotool/
若干基本用法:
xdotool mousemove x y
將鼠標移動到在屏幕上特定的X和Y坐標位置
xdotool click 1
點擊鼠標左鍵,1表示左鍵,2表示中鍵,3表示右鍵。
xdotool key ctrl+l
同時按下ctrl和l鍵
更多命令詳解請輸入:man xdotool
這個工具沒有內置延時和循環功能。不過linux下提倡的就是一個軟件做一件事,這個功能只要稍微組合一下就能實現了。
舉個例子:
如果要鼠標每隔10秒點擊左鍵一次
我們可以用終端下的watch命令組合實現
watch -n 10 xdotool click 1