Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active April 26, 2021 15:41
Show Gist options
  • Save JoeGlines/9f8cec34fda7bd2b96a89e6f060c4bd6 to your computer and use it in GitHub Desktop.
Save JoeGlines/9f8cec34fda7bd2b96a89e6f060c4bd6 to your computer and use it in GitHub Desktop.
Works when mouse is over Taskbar
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
;*******adjust volume by scrolling while mouse is over taskbar*********************************
;#If MouseIsOver("ahk_class Shell_TrayWnd") ; http://www.autohotkey.net/~Lexikos/AutoHotkey_L/docs/commands/_If.htm
#If MouseIsOver("ahk_class Shell_TrayWnd") or MouseIsOver("ahk_class Shell_SecondaryTrayWnd ;To use over taskbars on other monitors
WheelUp::Send {Volume_Up} ;Increase volume when over taskbar
WheelDown::Send {Volume_Down} ;Decrease volumen when over taskbar
#If
MouseIsOver(WinTitle) {
MouseGetPos,,, Win ;Detect Window mouse is over
return WinExist(WinTitle " ahk_id " Win) ;Return Window title that Mouse is overj
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment