Adding more formatting/information into clicker.sh script.
[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         # TP-Link switch
18         #./adb shell input tap 1002 913
19         # D-Link switch
20         ./adb shell input tap 987 346
21         #date +%r
22         date +"%m/%d/%Y %r"
23         #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
24         #RAND=$[`jot -r 1 $RAN_STA $RAN_END`]
25         #echo "Delay: $RAND seconds"
26         #sleep $[$RAND]s
27         
28         # pick a prime number > 120 seconds
29         sleep 131s
30 done