Please post what you find on this, I'm curious too.

If you do go the enum windows route, It thought I'd
post my notes on this since I recently got it working.
It's somewhat confusing (for me at least) since it
uses a callback:


# Callback function for findWindowHandle
def windowEnumerationHandler(hwnd, resultList):

    resultList.append((hwnd,
win32gui.GetWindowText(hwnd)))


def findWindowHandle(string):

    topWindows = []

    win32gui.EnumWindows(windowEnumerationHandler,
topWindows)

    for window in topWindows:
        if string in window[1]: return window[0],
window[1]

    # Looks like we didn't find anything
    return None, None


handle, windowtext = findWindowHandle("Notepad")







      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to