Anonymous - 2008-04-17

I am using the following code to activate windows via the taskbar:

def activateTaskbarWindow(index): # this starts counting at 1
    index=int(index) # ensure integer not string
    # there are exactly twice as many windows for some reason
    bc=[taskbar.RunningApplications.GetButtonRect(i) for i in
    r = bc[2*(index-1)+1] # get rectangle of desired window
    # activate foreground window with a click
    return hwnd

As you can see, I'm using the mouse to click on the taskbar with the
ClickInput above.

Is there an alternative method that does not use the mouse?

Thanks in advance.