[python-win32] how to activate subwindow of the application ???

neha rai neharai.nitk at gmail.com
Mon May 12 07:29:27 CEST 2008


Hi Tim and Mike,

As Tim said "whatever piece of code you're running
in the first place to open the window can persist whatever pieces of data it
needs to open the same window again."

First time the window is opened by the user, user can pick any window on
which it needs to work (in my case window are is subwindow of a application)
My code identifies the window by using :
hand=win32gui.GetForegroundWindow()
My code performs action on the window and closes it.. now i want it to open
automatically.


I hope its more clear now..

Please let me know if  any of you have a way to do this.

Thanks
Neha




On Fri, May 9, 2008 at 7:07 PM, Mike Driscoll <mdriscoll at co.marshall.ia.us>
wrote:

> Tim Golden wrote:
>
>> <div class="moz-text-flowed" style="font-family: -moz-fixed">neha rai
>> wrote:
>>
>>>  I am making a tool that needs to open subwindow of another application,
>>> enter some text in it click ok and then open the same window again. i am
>>> able to  put text and click 'OK'  but I am not able to open the same
>>> window
>>> again using the python code. I need some thing that can remember what i
>>> opened(or the last window opened) and open it again.
>>>
>>
>> I'm sorry, but for the life of me I can't work out what you're trying
>> to do here. Unless someone has better intuition than me and comes
>> to the rescue, could you post some code to show what's you're doing
>> and indicate where it doesn't work?
>>
>> Thanks
>>
>> TJG
>>
>> PS If you aren't already, worth looking at WATSUP [1] and PyWinAuto [2]
>>
>> [1] http://www.tizmoi.net/watsup/intro.html
>> [2] http://pywinauto.pbwiki.com/
>>
>> </div>
>>
> Tim,
>
> The OP is probably talking about a window that's part of the application,
> like when you open the Preferences dialog or how some Excel versions can
> allow one to open multiple spreadsheets and minimize them within the
> application.
>
> As to how to manipulate that sort of thing in a pre-made app... I haven't
> the slightest... except maybe SendKeys or the links you gave.
>
> Mike
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080512/4f230f05/attachment.htm>


More information about the python-win32 mailing list