Updating the automation script clicker.sh
[pingpong.git] / automation / clicker.sh
1 #!/bin/bash
2
3 # This script does clicking action automatically
4 # We just need to set up the timer duration
5
6 # Loop variables
7 BEGIN=1
8 END=100
9 INC=1
10
11 # Range of random number (in seconds)
12 RAN_STA=100
13 RAN_END=200
14
15 for ((i=$BEGIN; i<=$END; i+=$INC));
16 do
17         #./adb shell getevent -l - use this command to get the position
18         # TP-Link switch
19         #./adb shell input tap 1002 913
20         # TP-Link bulb on/off
21         ./adb shell input tap 981 358
22         # D-Link switch
23         #./adb shell input tap 987 346
24         # SmartThings
25         #./adb shell input tap 921 1188
26         # WeMo
27         #./adb shell input tap 981 532
28         # WeMo Insight
29         #./adb shell input tap 981 326
30         #date +%r
31         date +"%m/%d/%Y %r"
32         #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
33         #RAND=$[`jot -r 1 $RAN_STA $RAN_END`]
34         #echo "Delay: $RAND seconds"
35         #sleep $[$RAND]s
36         
37         # pick a prime number > 120 seconds
38         sleep 131s
39 done