The macro allows you to automate the farming of resources (gold, stone, coal). You need to approach the resource, hover the cursor over it, press the activation button, use the tool and leave it for a specified time. Now the whole process will happen automatically, saving you time and effort.