From f950c7bb5912ce9362bc7d100533ea5130e671a3 Mon Sep 17 00:00:00 2001 From: Gotbletu Date: Fri, 29 Mar 2013 12:15:37 -0700 Subject: [PATCH] swag --- sbtv_v1.sh | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100755 sbtv_v1.sh diff --git a/sbtv_v1.sh b/sbtv_v1.sh new file mode 100755 index 0000000..59d8a86 --- /dev/null +++ b/sbtv_v1.sh @@ -0,0 +1,121 @@ +#!/bin/bash +# http://toolbartv.swagbucks.com +# requires: xdotool +# xdotool getmouselocation +# xdotool mousemove x y + +# ------------------------------------------------------ +# y cordinates ranges (top to bottom) +FIXEDBOX=$(shuf -i 520-577 -n 1) + +# x cordinates ranges (left to right) +# will select a random number within that range +BOX1=$(shuf -i 32-105 -n 1) +BOX2=$(shuf -i 116-190 -n 1) +BOX3=$(shuf -i 200-274 -n 1) +BOX4=$(shuf -i 285-357 -n 1) + +# x & y cordinates ranges for the right green arrow +# will select a random number within that range +X_ARROW=$(shuf -i 366-375 -n 1) # left to right +Y_ARROW=$(shuf -i 540-565 -n 1) # top to bottom + +# sound play when finish +alertme() { + mplayer ~/Public/sound-effects/mariobros/cheerRedTeam.wav +} +#----------------------------------------------------- + +# sleep timer before next click (dont need to change this) +SLPNUM=$(shuf -i 55-80 -n 1) + + +# made it move 2 times to the same box +# my lame way of making it click if i am on the computer using the mouse also. +video_one() { + xdotool mousemove $BOX1 $FIXEDBOX + xdotool click 1 + sleep $SLPNUM +} +video_two() { + xdotool mousemove $BOX2 $FIXEDBOX + xdotool click 1 + sleep $SLPNUM +} + +video_three() { + xdotool mousemove $BOX3 $FIXEDBOX + xdotool click 1 + sleep $SLPNUM +} +video_four() { + xdotool mousemove $BOX4 $FIXEDBOX + xdotool click 1 + sleep $SLPNUM +} + +arrow_click() { + xdotool mousemove $X_ARROW $Y_ARROW + xdotool click 1 + sleep 5 +} + +# start from box1 +method_a() { + # initial sleep time delay; so u can move your terminal/apps out of the way + sleep 3 + video_one && video_two && video_three && video_four + arrow_click + video_one && video_two && video_three && video_four + arrow_click + video_one && video_two + alertme +} + +# start from box3 +method_b() { + # initial sleep time delay; so u can move your terminal/apps out of the way + sleep 3 + video_three && video_four + arrow_click + video_one && video_two && video_three && video_four + arrow_click + video_one && video_two && video_three && video_four + alertme +} + + +# This is for when i need to take a long shit; so make it stop at video number 9 +# start from box1 +shit_a() { + # initial sleep time delay; so u can move your terminal/apps out of the way + sleep 3 + video_one && video_two && video_three && video_four + arrow_click + video_one && video_two && video_three && video_four + arrow_click + video_one +} +# start from box3 +shit_b() { + # initial sleep time delay; so u can move your terminal/apps out of the way + sleep 3 + video_three && video_four + arrow_click + video_one && video_two && video_three && video_four + arrow_click + video_one && video_two && video_three +} + +# enter in options users like to run +if [[ "$1" == 1 ]]; then + method_a +elif [[ "$1" == 2 ]]; then + method_b +elif [[ "$1" == 1shit ]]; then + shit_a +elif [[ "$1" == 2shit ]]; then + shit_b +else + echo "enter argument 1, 2, 1shit, or 2shit. example: sbtv 2" +fi