bobbo
Joined: 19 Mar 2007 Posts: 14
|
Posted: Wed Apr 16, 2008 8:34 pm Post subject: Activate a toolbar on the taskbar |
|
|
Here is a quick script that I find useful (and was deceptively simple to make operate reliably). I found that I always use the left WIN key for shortcut keys and the start menu, so I remapped the right WIN key to open a toolbar that contains a list of all my frequently used programs.
NAME: Activate Taskbar Toolbar
Version: 1.0, 16Apr2008
Author: BOBBO
PURPOSE: Remaps the right WIN key to pop-up a taskbar toolbar.
| Code: | ~RWin Up::
; configuration - what is the name of your toolbar?
toolbarname := "Programs"
; do nothing if toolbar not loaded
WinGetText, text, ahk_class Shell_TrayWnd
if (InStr(text, %toolbarname%) = 0)
return
; find the control name of the toolbar
Loop,9
{
ControlGetText, text2, ToolbarWindow32%A_Index%, ahk_class Shell_TrayWnd
IfInString,text2,%toolbarname%
{
progname = ToolbarWindow32%A_Index%
break
}
}
; ALT-TAB if taskbar is already selected
; else activate the toolbar
WinGetClass, activeclass, A
if (activeclass="Shell_TrayWnd")
Send, {ALT DOWN}{TAB}{ALT UP}
else
ControlSend, %progname%, {Down}, ahk_class Shell_TrayWnd
Return |
It's also fairly intuitive, because the start button is on the left side, and I arranged the program toolbar to be on the left side next to the clock. Here's an example image from http://windows.about.com/od/customizethetaskbar/ss/add_toolbars_7.htm:
 |
|