Hi there!
We all know how annoying is having to click on each tile in Farmville every single time we have some crop ready to harvest.
This is where the autoclicker comes in. This autoclicker is made in applescript, so only MAC OS users can use this (i’m working on a windows version btw). Applescript is cool, but i warn you, some adjustments could be necessary before it runs smoothly. Let’s start, shall we?
Step 1:
Install the pre reqs. You’ll need a hotlink manager. Personally, i use Spark (download page: http://www.shadowlab.org/softwares/spark.php ). You can use whatever you want, but in this tutorial i’ll use Spark, it’s free, it works, it’s good.
Another thing you’ll absolutely need is Extra Suites. What’s this? Basically, extra suites is a library with additional features for applescripts. The autoclicker needs this to be installed to work.
Finally, make sure that you have script editor installed in your system. If not, grab your mac os cd and install it.
Note:
Extra Suites is not free. You can download a free demo from the link i’ve written before. The autoclicker will work but a small nag window will appear everytime you’ll use it. It’s ok, you can close the window when you’ve finished, but i think that if you use a software, you should buy it, and this software costs only 10 bucks.
Step 2:
That’s it for the pre reqs. Now we’re dealing with the real thing. The autoclicker is made of 3 applescripts. Here is what you have to do: copy this 3 scripts, paste them in the script editor, save them where you want (in the same folder possibly) and name them as i did.
farmvilleclick.scpt :
set myLoc to my getMouseLocation()
tell application "Extra Suites"
set x to item 1 of myLoc
set y to item 2 of myLoc
set x to x + 25
set y to y - 12
ES move mouse {x, y}
delay 0.1
ES click mouse
end tell
on getMouseLocation()
tell application "Extra Suites"
set mouseLoc to (ES mouse location)
end tell
return mouseLoc
end getMouseLocation
return 0
farmvilleclicksx.scpt :
set myLoc to my getMouseLocation()
tell application "Extra Suites"
set x to item 1 of myLoc
set y to item 2 of myLoc
set x to x - 25
set y to y - 12
ES move mouse {x, y}
delay 0.1
ES click mouse
end tell
on getMouseLocation()
tell application "Extra Suites"
set mouseLoc to (ES mouse location)
end tell
return mouseLoc
end getMouseLocation
return 0
farmvilleclickdown.scpt :
set myLoc to my getMouseLocation()
tell application "Extra Suites"
set x to item 1 of myLoc
set y to item 2 of myLoc
set x to x - 25
set y to y + 12
ES move mouse {x, y}
delay 0.1
ES click mouse
end tell
on getMouseLocation()
tell application "Extra Suites"
set mouseLoc to (ES mouse location)
end tell
return mouseLoc
end getMouseLocation
return 0
As you may have got, this 3 scripts click up, left and down in your farm. Now we have the main structure of our autoclicker, let’s add the automation!
Step 3:
Let’s open Spark. File-> New Hotkey-> Applescript.
Choose the shortcut you like the most, this will be the shortcut you’ll press everytime you’ll use the autoclicker. Choose a name for the automator, it doesn’t matter. In the big text box write this:
repeat 10 times
repeat 19 times
run script ("/PATH TO YOUR FILES/farmvilleclick.scpt" as POSIX file)
end repeat
run script ("/PATH TO YOUR FILES/farmvilleclicksx.scpt" as POSIX file)
repeat 19 times
run script ("/PATH TO YOUR FILES/farmvilleclickdown.scpt" as POSIX file)
end repeat
run script ("/PATH TO YOUR FILES/farmvilleclicksx.scpt" as POSIX file)
end repeat
Obviously, replace PATH TO YOUR FILES with the actual path where you saved the scripts. As you can see, there are some numbers. repeat 10 times and repeat 19 times. This is because my farm is 20x20. If yours is different you’ll have to change these values.
For example if you have a 18x18, you’ll write:
repeat 9 times instead of repeat 10 times
and repeat 17 times instead of repeat 19 times
You got it?
The first repeat is half the lenght of your farm, the second is the length of your farm minus one.
This is it, click Update and it’s time for the big test.
Go to your farm, make it fullscreen and zoom as out as possible. Place the mouse on the lowest tile and manually click on it to harvest (the first tile is harvested manually). Then press your hotkey and hope everything’s alright.
If you notice that the mouse doesn’t click where you want, check the applescripts. You see those numbers, 25 and 12? Those are the tiles dimensions at my screen resolution, maybe you’ll have to tweak on those values at different resolutions. Anyway on a macbook at 1280x800 it works like a charm.
Et voila. Enjoy this autoclicker.
For questions comments or whatever, you can reach me at
giulio.finestrali DELETETHIS @gmail.com
Bye!