From b95d397b0286187acb69affcff22e29e21e38f7a Mon Sep 17 00:00:00 2001 From: rtrimana Date: Mon, 4 Jun 2018 16:36:11 -0700 Subject: [PATCH] Using adb to click automatically on Android app; enabling automation --- automation/clicker.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 automation/clicker.sh 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 -- 2.34.1