-
Notifications
You must be signed in to change notification settings - Fork 9
/
magic2.sh
executable file
·110 lines (92 loc) · 1.79 KB
/
magic2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
pos_a="700 481"
pos_b="699 513"
pos_c="700 543"
pos_siguiente="992 585"
pos_empezar="988 602"
pausa="0.05"
pausa2="0.0"
#window_ff=`xdotool search "Mozilla Firefox" | head -1`
#window_konsole=`xdotool search --onlyvisible "konsole" | head -1`
pos_konsole="1155 433"
pos_a="564 484"
pos_b="563 516"
pos_c="563 546"
pos_siguiente="873 589"
pos_empezar="824 608"
pos_empezar2="781 523"
# 679394064:
#pos_a="577 430"
#pos_b="577 462"
#pos_c="577 491"
#pos_siguiente="885 529"
#pos_empezar="869 553"
#pos_empezar2="866 474"
while [ 1 ]; do
read -n 1 opcion
case $opcion in
8)
#xdotool windowfocus $window_ff
xdotool mousemove $pos_a
xdotool click 1
xdotool click 1
echo "a";
# sleep $pausa
xdotool mousemove $pos_siguiente
# sleep $pausa2
xdotool click 1
# sleep $pausa
xdotool mousemove $pos_konsole
xdotool click 1
# xdotool windowfocus $window_konsole_
;;
9)
xdotool mousemove $pos_b
xdotool click 1
xdotool click 1
echo "b";
# sleep $pausa
xdotool mousemove $pos_siguiente
# sleep $pausa2
xdotool click 1
# sleep $pausa
xdotool mousemove $pos_konsole
xdotool click 1
# xdotool windowfocus $window_konsole_
;;
0)
xdotool mousemove $pos_c
xdotool click 1
xdotool click 1
echo "c";
# sleep $pausa
xdotool mousemove $pos_siguiente
# sleep $pausa2
xdotool click 1
# sleep $pausa
xdotool mousemove $pos_konsole
xdotool click 1
# xdotool windowfocus $window_konsole_
;;
1)
xdotool mousemove $pos_empezar
xdotool click 1
# sleep $pausa2
xdotool click 1
echo "empezar1";
xdotool mousemove $pos_konsole
xdotool click 1
;;
2)
xdotool mousemove $pos_empezar2
xdotool click 1
# sleep $pausa2
xdotool click 1
echo "empezar2";
xdotool mousemove $pos_konsole
xdotool click 1
;;
*)
echo "Opcion desconocida";
;;
esac
done