You can use AutoHotkey to do this. Basically you tell it that if your cursor is over the taskbar or one of the preview thumbnails that opens from it, then scrolling up with your mouse wheel sends a left click, otherwise it scrolls up.
This requires using the Windows API. I've tested this script and it seems to work like you want, though I believe it will send a click anywhere on the taskbar, and not just over window icons. I'm afraid that's the best I could manage.
; Allocate the memory (8 bytes) for the POINT structure
VarSetCapacity(POINT, 8, 0)
; Call the GetCursorPos function with the address
; of the POINT structure we just created
DllCall("GetCursorPos", uint, &POINT)
; Use NumGet to get the information out of the structure
; the x-value is stored in the first 4 bytes, and
; the y-value in the last 4
X := NumGet(POINT, 0)
Y := NumGet(POINT, 4)
return GetWinAtCoords(X, Y, what)
GetWinAtCoords(x,y,what="Title") ; by SKAN and Learning one
; Returns Title/ID/Class/PID of window at given coordinates
WinID := DllCall( "GetAncestor", UInt ; by SKAN
,DllCall( "WindowFromPoint", Int,X, Int,Y )
, UInt, GA_ROOT := 2)
if what = Title
WinGetTitle, WinTitle, ahk_id %WinID%
else if what = ID
else if what = Class
WinGetClass, WinClass, ahk_id %WinID%
else if what = PID
WinGet, WinPID, PID, ahk_id %WinID%
PointedClass := GetWinUnderMouse("Class")
if (PointedClass = "TaskListThumbnailWnd" or PointedClass = "Shell_TrayWnd")
If you add a tilde (~) before
WheelUp:: then the wheel up functionality will remain even when a left click is sent (you can also do away with the
else clause in there if you do so).
To use, simply install the program, put the script in a file and run it.