Need help with FindWindow()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MegaOctet
    New Member
    • Oct 2009
    • 3

    Need help with FindWindow()

    Hello,

    Here is my script

    Code:
    import win32gui as w
    HWND= w.FindWindow("Document - WordPad",None)
    and here is the traceback:
    Traceback (most recent call last):
    File "C:\Python26\es sai1.py", line 30, in <module>
    HWND2= w.FindWindow("D ocument - WordPad",None)
    error: (2, 'FindWindow', 'Le fichier sp\xe9cifi\xe9 est introuvable.')

    Could anyone help me?
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Code:
    >>> import win32gui
    >>> win32gui.FindWindow("WordPadClass", "Document - WordPad")
    133254
    >>>

    Comment

    • MegaOctet
      New Member
      • Oct 2009
      • 3

      #3
      Thanks a lot for your answer. It works.

      Comment

      Working...