alcher.sh (517B)
1 #!/usr/bin/env bash 2 3 # include functions 4 source "$(dirname "${BASH_SOURCE[0]}")/functions.sh" 5 6 if [ -z "$1" ]; then 7 echo "Usage: $0 <number>" 8 echo 9 echo "Runs the script the specified number of times." 10 echo 11 echo "Example:" 12 echo " $0 44" 13 exit 1 14 fi 15 16 count=$1 17 18 startup 19 20 # Count down 21 printf " - Starting script in 3 seconds...\n" 22 sleep 3 23 24 for ((i=count; i>0; i--)); do 25 printf '\r - Running script %d times' "$i" 26 left_click 27 msleep 250 450 28 left_click 29 msleep 3200 3600 30 done 31 32 complete