473,661 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting focused window of another app

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
1 1075
Never mind ...
wHnd = win32gui.GetFor egroundWindow()
Caption = win32gui.GetWin dowText (wHnd)

Jul 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7972
by: dan glenn | last post by:
hi. I want to code a 'preview' function into a guestbook entry page. I can do it with a button that posts, bringing up a whole new page showing a preview of what has been entered, and then the user could hit a 'return to entry form' button or some-such and go back to the form. But what I want to do instead is just use an HTML link with some javascript to grab the form's textarea value, and open another browser window that uses a php file...
0
334
by: lukasz | last post by:
I'm looking for ideas how to implement a tool window with several buttons which, once clicked, should paste certain character in to the active EditBox in an other window of my application. The problem is to know which EditBox was focused before the focus went to the tool window, and then paste the character to the EditBox, but one apparent solution (logging all Windows events) is too time consuming. Lukasz
3
1820
by: pnp | last post by:
How can I make a Toolbox form always stay focused without making it a topmost form?
0
929
by: gif | last post by:
i have a main form and a toolbar in an dialog box. I would make the comportment of the toolbar like a child window, but having the possibility to move it also outside the main client area. What i need to do? Just make focuse both the windows when i click on one of them, and lose the focus when i click outside of them. Not just a window focused and the other unfocused but both focused if it is one activeted and both unfocused it it is...
7
18690
by: - Electronic.HR - | last post by:
I have very strange and stupid problem with .NEt's webBrowser control... If I do this: ---------------------------------- private void btnGoogle_click(object sender, EventArgs e) { webBrowser1.Navigate(http://www.google.com);
3
1190
by: rsjonny | last post by:
I'm writing C++ code with visual studio 2005, I find when my source edit view get focused, the property of this class is missing, so if I want to add a virtual function or a window's message handler function, I must click in class view. I want to know that's why, I installed visual.Assist, I don't know if this has problem? can somebody give me an answer.
2
4424
by: jodleren | last post by:
Hi I want to open a window using JS, when a button is pressed. In the new window I'd like to check for which button was pressed. For cetain reasons, I'd like not to have that in the URL. What I have is function whatever(input) {
0
870
by: Gilgul | last post by:
Hi i am trying to find the handle of the current focused control in all the running application. I tried GETFOCUS() but it gave the the handle only of the current thread There are 2 options of solving it. One, is to find an API function that do it. Secound, is to find a function that detarmin if a control is focused the i can make a loop checking all the controls. Please halp me fint one of this functions. BTW: I allready tried
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8754
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8542
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2760
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1740
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.