Windows XP Quick Launch shortcuts with WinKey

3

How can I make the WinKey+[number] combination run the [number]th item in Windows XP's Quick Launch bar? In other words, I want to mimic the Windows 7 behavior.

user541686

Posted 2011-07-05T22:32:43.093

Reputation: 21 330

Windows 7 does exactly that, although the whole taskbar is now a quick launch bar. – paradroid – 2011-07-06T00:27:48.783

@Paranoid: :O OMG, how surprising! I had no idea Windows 7 did that, and it was a pure coincidence that I said XP in the title and the question! (... lol, just kidding, I use it like fifty times per hour when I'm using Windows 7, and I want it in XP; that's why I asked. :P) – user541686 – 2011-07-06T00:34:24.017

Answers

1

Sure is, use HotKeyBind

http://www.technixupdate.com/assign-window-hotkeys-to-quick-launch-items-in-win-xp-with-hotkeybind/

  1. First Download and install HotKeyBind.

  2. You will see a gray colored icon in the task bar if it is running

  3. Double click on this icon a new window will appear

  4. Click on the Add button, and select the option which says Launch a File >> Executes a Program and Click Ok

  5. Browse to the target quick launch items folder , path for it would be :\Documents and Settings\\Application Data\Microsoft\Internet Explorer\Quick Launch

For Example: C:\Documents and Settings\zapper\Application Data\Microsoft\Internet Explorer\Quick Launch

Note: Make sure the that Show hidden files and folder is set to shown in folder options before browsing to this path. Other wise copy the path above and paste it in the address bar and drag the quick launch items on the target box.

  1. After selecting the shortcut for the program like Gtalk in quick launch items click Ok

  2. A New window will open up with title as Edit Keys , click the checkbox WIN and press any number key.

As Google talk is the first item in my quick launch after Start button so I have set the shortcut for it as Win +1

  1. That’s it Done

Moab

Posted 2011-07-05T22:32:43.093

Reputation: 54 203

+1 because it works, but it doesn't actually do what I needed (I think I was vague about this, though). What this program does is not specific to Quick-Launch. By contrast, I was looking for a solution where WinKey+N would always execute the Nth item in the Quick Launch bar, which this doesn't do. – user541686 – 2011-07-06T00:23:10.050

The article says how to bind it to the quicklaunch? – Moab – 2011-07-06T02:36:13.557

No, it binds it to the program, which happens to be in the Quick Launch. If I move around the shortcuts in the quick launch bar, the keys will still be bound as they were before -- so WinKey+1 might launch program #4. It's not really binding to the icons but to the programs themselves, which isn't quite what I want. – user541686 – 2011-07-06T02:48:19.397

I guess you could use process monitor to capture the event on a W7 pc, see how it is calling position 1 on the taskbar. – Moab – 2011-07-06T02:53:11.890

It's likely not something that you can see on Process Monitor -- it's probably just some window message, maybe better seen with Spy++. I could probably figure it out and write a program for it if I really want to, but if there's something already available I don't want to reinvent the wheel. – user541686 – 2011-07-06T02:55:12.743

1

I just wrote a program to do this myself.

Base64-encoded version of my executable:

TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAADJCgP2jWttpY1rbaWNa22lTmQwpYhrbaWNa2ylgWttpU5kCaWMa22lTmQ3pYxrbaVSaWNojWttpQAAAAAAAAAAAAAAAAAAAABQRQAATAECAIysUU4AAAAAAAAAAOAADwELAQcKAAQAAAACAAAAAAAAqREAAAAQAAAAIAAAAABAAAAQAAAAAgAABAAAAAAAAAAEAAAAAAAAAAAwAAAABAAAAAAAAAIAAAQAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAAwSAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC50ZXh0AAAAbgMAAAAQAAAABAAAAAQAAAAAAAAAAAAAAAAAACAAAGAuZGF0YQAAAAQAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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fz/1jPAQOsdoQAgQAA7w3QS/3UQ/3UM/3UIUP8VIBBAAOsCM8BfXlvJwgwAVYvsg+wcVzP/V1f/FQAQQABQaKwQQABqDf8VEBBAADvHowAgQAB0NYP4/3QwVos1MBBAAOsZg/j/dCGNReRQ/xUcEEAAjUXkUP8VCBBAAFdXjUXkV1D/1jvHddpeM8BfycPMSBIAAAAAAAAAAAAAlBIAAAAQAABQEgAAAAAAAAAAAABiEwAACBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgBIAAAAAAACiEgAAthIAAMYSAADaEgAA6hIAAP4SAAASEwAAJBMAADITAABCEwAAVBMAAAAAAAB4AUdldE1vZHVsZUhhbmRsZVcAAEtFUk5FTDMyLmRsbAAApABEaXNwYXRjaE1lc3NhZ2VXAABCAlNlbmRNZXNzYWdlVwAAjQJTZXRXaW5kb3dzSG9va0V4VwDnAEZpbmRXaW5kb3dFeFcAEAFHZXREZXNrdG9wV2luZG93AACsAlRyYW5zbGF0ZU1lc3NhZ2UAABoAQ2FsbE5leHRIb29rRXgAACMBR2V0S2V5U3RhdGUAAgJQb3N0TWVzc2FnZVcAAAMCUG9zdFF1aXRNZXNzYWdlAEABR2V0TWVzc2FnZVcAVVNFUjMyLmRsbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=

Source code:

//Flags:  /O1 /link /NoDefaultLib /entry:WinMainCRTStartup /Subsystem:Windows
//No need for a C runtime library...

#define _WIN32_WINNT 0x502
#include <tchar.h>
#include <windows.h>
#include <commctrl.h>

static HHOOK hHook = NULL;

LRESULT CALLBACK KeyboardHook(IN int nCode,
                              IN WPARAM wParam, IN LPARAM lParam)
{
    BOOL suppress = FALSE;
    LPKBDLLHOOKSTRUCT pKBDHS = (LPKBDLLHOOKSTRUCT)lParam;
    int nKey = pKBDHS->vkCode - 0x30;
    if (nCode >= 0 && wParam == WM_KEYDOWN && 0 <= nKey && nKey <= 9)
    {
        if (nKey == 0)
        {
            /*Quit*/
            suppress = TRUE;
            PostQuitMessage(0);
        }
        else if (GetKeyState(VK_LWIN) < 0 || GetKeyState(VK_RWIN) < 0)
        {
            HWND hWnd = GetDesktopWindow();
            if (hWnd != NULL)
            { hWnd = FindWindowEx(hWnd, NULL, _T("Shell_TrayWnd"), NULL); }
            if (hWnd != NULL)
            { hWnd = FindWindowEx(hWnd, NULL, REBARCLASSNAME, NULL); }
            if (hWnd != NULL)
            {
                hWnd = FindWindowEx(hWnd, NULL,
                                    TOOLBARCLASSNAME, _T("Quick Launch"));
            }
            if (hWnd != NULL)
            {
                suppress = TRUE;
                DWORD btnSize = SendMessage(hWnd, TB_GETBUTTONSIZE, 0, 0);
                LONG coord = MAKELONG((nKey - 1) * LOWORD(btnSize), 0);
                PostMessage(hWnd, WM_LBUTTONDOWN, 0, coord);
                PostMessage(hWnd, WM_LBUTTONUP, 0, coord);
            }
        }
    }
    if (suppress) { return 1; }
    else if (hHook == NULL) { return 0; }
    else { return CallNextHookEx(hHook, nCode, wParam, lParam); }
}

int WinMainCRTStartup()
{
    HINSTANCE hInstance = GetModuleHandle(NULL);
    hHook = SetWindowsHookEx(WH_KEYBOARD_LL, &KeyboardHook, hInstance, 0);
    if (hHook != NULL && hHook != INVALID_HANDLE_VALUE)
    {
        MSG msg;
        BOOL success;
        while (success = GetMessage(&msg, NULL, 0, 0))
        {
            if (success == -1) { break; }
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }
    return 0;
}

user541686

Posted 2011-07-05T22:32:43.093

Reputation: 21 330