Skip to content

Instantly share code, notes, and snippets.

@Sheridan
Created May 12, 2018 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sheridan/df465a3946492fc3273fdacc88d02bb8 to your computer and use it in GitHub Desktop.
Save Sheridan/df465a3946492fc3273fdacc88d02bb8 to your computer and use it in GitHub Desktop.
FCE dirty hack
#!/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