From: rtrimana Date: Mon, 4 Jun 2018 23:36:11 +0000 (-0700) Subject: Using adb to click automatically on Android app; enabling automation X-Git-Url: http://plrg.eecs.uci.edu/git/?p=pingpong.git;a=commitdiff_plain;h=b95d397b0286187acb69affcff22e29e21e38f7a;ds=sidebyside Using adb to click automatically on Android app; enabling automation --- diff --git a/automation/clicker.sh b/automation/clicker.sh new file mode 100755 index 0000000..50a88ad --- /dev/null +++ b/automation/clicker.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# This script does clicking action automatically +# We just need to set up the timer duration + +# Loop variables +BEGIN=1 +END=5 +INC=1 + +# Range of random number (in seconds) +RAN_STA=2 +RAN_END=6 + +for ((i=$BEGIN; i<=$END; i+=$INC)); +do + # TP-Link switch + #./adb shell input tap 1002 913 + date +%r + #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA] + RAND=$[`jot -r 1 $RAN_STA $RAN_END`] + #echo "Delay: $RAND seconds" + sleep $[$RAND]s +done