If your mouse has a free-spin mouse wheel (opposed to notched)
1. Bind your mouse wheel to use default action under controls > assignments interact > use default action
2. Walk up to an apple tree or berry bush, when the option comes up to "search for apples", spin your mouse wheel.
Alternatively, a macro could be used to hit spacebar (or whichever key is assigned to use default action) every 25 ms or so.
Results in hundreds of apples being gathered in a minute or so and only having to wait for an animation or two to complete.