I use the AutoHotkey script below which allows me to change the volume using my mouse scroll wheel when hovering over the taskbar in Windows 10. However, this only works on the monitor that is selected as the "main display". I have multiple displays that are used to extend my desktop. Using the mouse wheel scroll on the extended monitors taskbars does not work.
Is there a way to modify the script to work with extended displays?
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;--------------------------------------------------------------------
; Change volume using mouse scroll wheel over taskbar
;--------------------------------------------------------------------
#if MouseIsOver("ahk_class Shell_TrayWnd")
WheelUp::
Send {Volume_Up}
return
WheelDown::
Send {Volume_Down}
return
MouseIsOver(WinTitle) {
MouseGetPos,,, Win
return WinExist(WinTitle . " ahk_id " . Win)
}