A couple of suggestions on Reddit were:
1) See if Window Spy shows different information when hovering an app on the bar compared to empty space on the bar. I did that but there is no change at all.
2) Use a color picker to check where I'm clicking on the taskbar but, even though the taskbar looks like it's a solid colour, it isn't. It's made up of about 5 colours.
Code: Select all
#singleinstance force
#If MouseIsOver("ahk_class Shell_TrayWnd")
if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
menu, tray, icon, %A_ScriptDir%\volumouse.ico
Menu, Tray, Tip, Hover taskbar and use:`nMiddle-Click or Alt to mute/unmute volume.`nScroll Up/Down to control volume.
WheelUp::
Send {Volume_Up}
return
WheelDown::
Send {Volume_Down}
return
MButton::
Send {Volume_Mute}
return
alt::
Send {Volume_Mute}
return
MouseIsOver(WinTitle) {
MouseGetPos,,, Win
return WinExist(WinTitle . " ahk_id " . Win)
}