AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Activate a toolbar on the taskbar

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
bobbo



Joined: 19 Mar 2007
Posts: 14

PostPosted: Wed Apr 16, 2008 8:34 pm    Post subject: Activate a toolbar on the taskbar Reply with quote

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:
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group