懒人工具4 -- 模拟键盘鼠标 自动化操作 xdotool

来源:互联网 发布:java ftp下载文件夹 编辑:程序博客网 时间:2024/06/02 20:39

按键精灵:适用于win

qt:Qt是一个跨平台应用程序框架

sikuli :win和linux都可用,需要Java支持。利用图像识别和Python编写的软件;

xdotool:适用于linux

1,安装 $ sudo apt-get install xdotool

2.基本使用:

  1. $ xdotool key super+p 模拟按键
  2. $ xdotool type ''            模拟输入
  3. $ xdotool search --name [name of the window] key [keys to press] 搜索打开的窗口并聚焦,然后点击。
  4. $ xdotool mousemove x y click 1    移动鼠标到 x y,然后点击左键(1 2 3 左中右)
  5. $ watch -n 10 xdotool click 1   鼠标每隔10秒点击左键一次
  6. $xdotool getactivewindow windowmove 200 y 移动活动窗口的位置
  7. $eval $(xdotool getmouselocation --shell);echo $X $Y $SCREEN $WINDOW 获取鼠标位置

3.详情:man page

0 0
原创粉丝点击