Last active
December 27, 2015 01:19
-
-
Save penguin2716/7244112 to your computer and use it in GitHub Desktop.
ひみつののシェルスクリプト.用途はお察し
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#-*- coding: utf-8 -*- | |
# 画面の左上隅のマウスカーソルを合わせた状態で | |
# $ xdotool getmouselocation | |
# を実行し,座標を取得して設定する | |
SCREEN_LEFT_UPPER_CORNER_X=395 | |
SCREEN_LEFT_UPPER_CORNER_Y=185 | |
function click { | |
xdotool mousemove $1 $2 | |
xdotool click 1 | |
sleep 1 | |
} | |
function mclick { | |
xdotool mousemove_relative -- $1 $2 | |
xdotool click 1 | |
sleep 1 | |
} | |
function f1 { | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 191` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 263` | |
mclick 40 -54 | |
mclick 16 -7 | |
mclick 436 240 | |
mclick -52 2 | |
} | |
function f2 { | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 753` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 431` | |
sleep 4 | |
mclick 0 0 | |
sleep 15 | |
mclick 0 0 | |
sleep 4 | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 505` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 241` | |
sleep 4 | |
} | |
function f3 { | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 75` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 225` | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 119` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 121` | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 701` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 442` | |
sleep 3 | |
click `expr $SCREEN_LEFT_UPPER_CORNER_X + 42` `expr $SCREEN_LEFT_UPPER_CORNER_Y + 46` | |
sleep 1 | |
} | |
while [ true ]; do | |
f1 | |
sleep 50 | |
f2 | |
sleep 4 | |
f3 | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment