Prepare your inventory by placing an axe in the first slot and logs in the second. Then hover the cursor over the «deck» where you are chopping logs, and click on the pre-assigned button. The macro will automatically perform all actions related to cutting logs.