By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,495 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

Getting focused window of another app

P: n/a
Anyone know how to get the caption of the window currently in focus in
whatever app is in use? If I am using Excel, for example, I want my
python app to know that Excel is currently being used.

Jul 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Never mind ...
wHnd = win32gui.GetForegroundWindow()
Caption = win32gui.GetWindowText (wHnd)

Jul 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.