@encart So if I understand correctly. When holding the middle button, it would zoom in/out when scrolling the wheel, and if not holding the button it would pan when scrolling? If so, this can be done.
EDIT: got it now. would it be panning when holding the button and moving the mouse, and zooming with the wheel at the same time?