rsps-scripts

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

inv-1-to-2.sh (697B)


      1 #!/usr/bin/env bash
      2 
      3 # variables
      4 inventory_1=(1745 793 22 20)
      5 inventory_2=(1787 796 24 14)
      6 
      7 # include functions
      8 source "$(dirname "${BASH_SOURCE[0]}")/functions.sh"
      9 
     10 if [ -z "$1" ]; then
     11     echo "Usage: $0 <number>"
     12     echo
     13     echo "Runs the script the specified number of times."
     14     echo
     15     echo "Example:"
     16     echo "  $0 44"
     17     exit 1
     18 fi
     19 
     20 count=$1
     21 
     22 startup
     23 
     24 # Count down
     25 printf " - Starting script in 3 seconds...\n"
     26 sleep 3
     27 
     28 for ((i=count; i>0; i--)); do
     29     printf '\r - Running script %d times' "$i"
     30 		move_mouse "${inventory_1[@]}" # inventory 1
     31 		msleep 100 150
     32 		left_click
     33 		msleep 100 150
     34 		move_mouse "${inventory_2[@]}" # inventory 2
     35 		msleep 100 150
     36 		left_click
     37 done
     38 
     39 complete