It's mostly like the 3rd scenario there - although i don't need to output into the process, i just need to be able to differentiate between two different windows that have identical names, so that i can choose which window to have the user interact with from python.
On Mon, Aug 10, 2009 at 11:05 AM, Dave Angel<da...@ieee.org> wrote: > Eric Blade wrote: >> >> This is kind of a weird question - I have a process that has two >> windows with the exact same name. I need to figure out some way to >> differentiate between the two windows - what functions are there >> available that I can call to find out information about the two >> windows, so that I might be able to figure out exactly which one it is >> that my application needs to work with? Sorry about the vagueness of >> the question, but I just really don't have even the slightest idea >> about how to find out what it is that i want to know... >> >> >> > > I doubt if I can give you an answer, but I might be able to narrow down the > question so that either you or someone else on the list might be able to > solve it. > > There are at least three scenarios you could be describing. > > 1) You're writing a program (using tkinter, or wxPython, or ... gui tools), > and you've created two windows that need the same name. And from the same > program you want to manipulate widgets/controls within one of those windows. > but can't just use the window name. If this is the case, there are lots of > answers, but they're all dependent on the particular GUI you're using. > > > 2) You're running a 3rd party application that uses the same name for more > than one window, and you (the person at the keyboard) want to be able to > tell things about them. In this case, a program like SPY+ might just help. > > 3) You're running a 3rd party app as above, but you're writing a Python > program that needs to interact with it, perhaps by injecting messages into > its process. In this case, you need to find some other property of each of > the two windows that lets you distinguish them. If so, you need to say so, > and somebody (other than I) could help you find such information. > > > DaveA > > -- Cheers, - Eric _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32