Monthly Archives: March 2015

Autohotkey Script: Scroll Windows 7’s vertical taskbar to another column

Here’s another small autohotkey script that elevates the usability of Windows 7’s vertical taskbar. It enables one to scroll to another taskbar column (if open apps span to multiple columns) using mouse wheel.

#NoEnv  ; Avoids checking empty variables to see if they are environment
; variables. Recommended for performance and compatibility with future 
; AutoHotkey releases.

#SingleInstance force; Performs in single instance mode.

HScrollTaskBar( aDirection ){
	local hwnd
	local targetHwnd
	static WM_HSCROLL := 0x114
	hwnd := WinExist("ahk_class Shell_TrayWnd")
	ControlGet, targetHwnd, Hwnd,, MSTaskSwWClass1, ahk_id %hwnd%
	DllCall( "PostMessage", "Uint", targetHwnd, "Uint",  WM_HSCROLL, "Uint" , aDirection, "Uint", 0 )
	return
}

MouseIsOverTaskbar() {
	local win
    MouseGetPos,,, Win
    return WinExist("ahk_class Shell_TrayWnd ahk_id " . Win)
}

#If MouseIsOverTaskbar()
WheelUp::
	HScrollTaskBar(6)
	return
WheelDown::
	HScrollTaskBar(7)
	return	
#If