Created
May 12, 2018 12:44
-
-
Save Sheridan/df465a3946492fc3273fdacc88d02bb8 to your computer and use it in GitHub Desktop.
FCE dirty hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
target="FortressCraft" | |
sleep_between_digs=2 | |
digs=256 | |
function run_xdotool() | |
{ | |
current=$(xdotool getwindowfocus getwindowname) | |
if [ "$target" == "$current" ] | |
then | |
xdotool search --onlyvisible --name $target $@ | |
else | |
sleep 1 | |
fi | |
} | |
function dig() | |
{ | |
run_xdotool click 3 sleep 0.1 | |
#run_xdotool click 3 | |
} | |
while (true) | |
do | |
for ((j=$digs; j>0; j--)) | |
do | |
dig | |
done | |
sleep $sleep_between_digs | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment