Ubuntu 作業を自動化するための下調べ

 

xautomation

→ linuxでの作業が簡単に自動化できるxautomationを試してみた。

$ sudo apt-get install xautomation

  • /usr/bin/pat2ppm
  • /usr/bin/patextract
  • /usr/bin/png2pat
     マッチングに使用するパターンを生成
  • /usr/bin/rgb2pat
  • /usr/bin/visgrep
     指定した画像の中に指定したパターンがあるかどうか調べる。ある場合は座標と公差(tolerance)が返ってくる、複数ある場合は複数返ってくる
  • /usr/bin/xmousepos
  • /usr/bin/xte
     マウスとキーボートを操作する

 

http://pieceofnostalgy.blogspot.com/2014/02/blog-post.html

http://blog.father.gedow.net/2012/07/27/xautomation-auto-mouse-keyboard-manual/

 

xteコマンド

xte - Generates fake input using the XTest extension

XTE(1) General Commands Manual XTE(1)

NAME
xte – Generates fake input using the XTest extension

SYNOPSIS
xte [options] commands…

DESCRIPTION
xte is a program that generates fake input using the XTest extension, more reliable than xse.

OPTIONS
A summary of options is included below.

-i id XInput 2.x device to use. List devices with ‘xinput list’.

-x display
Send commands to remote X server. Note that some commands may not work correctly unless the display is on the
console, e.g. the display is currently controlled by the keyboard and mouse and not in the background. This
seems to be a limitation of the XTest extension.

–help, -h
Show summary of options.

COMMANDS
key k Press and release key k

keydown k
Press key k down

keyup k
Release key k

str string
Do a bunch of key X events for each char in string

mouseclick i
Click mouse button i

mousemove x y
Move mouse to screen position x, y

mousermove x y
Move mouse relative from current location by x, y

mousedown i
Press mouse button i down

mouseup i
Release mouse button i

sleep x
Sleep x seconds

usleep x
Usleep x microseconds

SOME USEFUL KEYS
These keys are case sensitive.

Home
Left
Up
Right
Down
Page_Up
Page_Down
End
Return
BackSpace
Tab
Escape
Delete
Shift_L
Shift_R
Control_L
Control_R
Meta_L
Meta_R
Alt_L
Alt_R
Multi_key
Super_L
Super_R

Depending on your keyboard layout, the “Windows” key may be one of the Super_ keys or the Meta_ keys.

SEE ALSO
pat2ppm(1), patextract(1), png2pat(1), rgb2pat(1), visgrep(1).

AUTHOR
xte was written by Steve Slaven .

LIMITATIONS
The str command doesn’t support Unicode characters with more than two bytes. Further, character composing sequences to
generate special charactes are limited to Multi_key plus two characters. The set of supported characters depends on
the current keyboard layout.

October 3, 2012 XTE(1)

 

現在のマウス位置を取得する

$ xdotool getmouselocation
 
実行例1)
x:484 y:708 screen:0 window:85983237
 
 

X Window Systemで動作する自動クリックツール(連打ツール)

XAutoClick

 

xAutoClickのダウンロードページ

→ xAutoClickのダウンロードページ

./configure

http://xautoclick.sourceforge.net/download.html

make
sudo make install

# cp cautoclick /usr/local/bin

 
piyo@piyo-FMVNA6HE:/usr/local/bin$ tree
.
├── aautoclick 対話型
├── cautoclick 非対話型
└── gautoclick2 GUI版

設定値について

設定値について
Pre-delay : Startボタンを押してからクリックを始めるまでの時間(ms)。
Interval : クリック間隔(ms)。
Random +/- : クリック間隔をランダムに増減させる範囲(ms)。
# of clicks : クリックする回数。
Tap(ボタン) : これを設定したい間隔で連続クリックすることでInterval,Random +/-が設定される。

 

https://kakurasan.blogspot.com/2016/03/autoclicker-linux-x11.html
 

xautomation
linuxでの作業が簡単に自動化できるxautomationを試してみた。
 
 

コメントは受け付けていません。