Connecting Tech Pros Worldwide Forums | Help | Site Map

Need help with FindWindow()

Newbie
 
Join Date: Oct 2009
Posts: 3
#1: 4 Weeks Ago
Hello,

Here is my script

Expand|Select|Wrap|Line Numbers
  1. import win32gui as w
  2. HWND= w.FindWindow("Document - WordPad",None)
and here is the traceback:
Traceback (most recent call last):
File "C:\Python26\essai1.py", line 30, in <module>
HWND2= w.FindWindow("Document - WordPad",None)
error: (2, 'FindWindow', 'Le fichier sp\xe9cifi\xe9 est introuvable.')

Could anyone help me?

bvdet's Avatar
Moderator
 
Join Date: Oct 2006
Location: Nashville, TN
Posts: 1,566
#2: 4 Weeks Ago

re: Need help with FindWindow()


Expand|Select|Wrap|Line Numbers
  1. >>> import win32gui
  2. >>> win32gui.FindWindow("WordPadClass", "Document - WordPad")
  3. 133254
  4. >>> 
Newbie
 
Join Date: Oct 2009
Posts: 3
#3: 4 Weeks Ago

re: Need help with FindWindow()


Thanks a lot for your answer. It works.
Reply