Re: [python-win32] BringWindowToTop doesn't work, anyone have try it?

2010-10-23 Thread nathon py
The most important thing is I'am sorry for saying that's a bug.

2010/10/23 nathon py nathon...@gmail.com

 The bug has been closed, you can check here

 http://sourceforge.net/tracker/?func=detailatid=551954aid=3077881group_id=78018
 with an answer 'This is just a feature of Windows' by 
 mhammondhttp://sourceforge.net/users/mhammond/
  .

 @Tim, I try the way you mentioned, it really works. I've tried
 ShowWindow(),EnableWindow(),etc, before. It never woks.
 @Preston, I read the tutorial you gave, it's very helpful.
 I use the command line as following :
 start pythonwin /app XXX.py
 It works and producing a window, if i go deep into the pythonWin, it's not
 a problem.

 thanks a lot for your advises


 Why I want to activate a window?
 Because I want to simulate some mouse clicking and keyboard typing in some
 application, doing this automatically please me.
 To activate a window is necessary.

 Why in script?
 To double click it or run it in command line is a easy way I prefer.


___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] BringWindowToTop doesn't work, anyone have try it?

2010-10-23 Thread nathon py
The bug has been closed, you can check here
http://sourceforge.net/tracker/?func=detailatid=551954aid=3077881group_id=78018
with an answer 'This is just a feature of Windows' by
mhammondhttp://sourceforge.net/users/mhammond/
 .

@Tim, I try the way you mentioned, it really works. I've tried
ShowWindow(),EnableWindow(),etc, before. It never woks.
@Preston, I read the tutorial you gave, it's very helpful.
I use the command line as following :
start pythonwin /app XXX.py
It works and producing a window, if i go deep into the pythonWin, it's not a
problem.

thanks a lot for your advises


Why I want to activate a window?
Because I want to simulate some mouse clicking and keyboard typing in some
application, doing this automatically please me.
To activate a window is necessary.

Why in script?
To double click it or run it in command line is a easy way I prefer.
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] BringWindowToTop doesn't work,anyone have try it?

2010-10-22 Thread nathon py
#  Let's say a window with title 'D:\\labBufferSpace' exists.
#  Code below does not work in DOS, or just double it.
#  But it works well in  PythonWin.
#  I do not want to run it in PythonWin every time.
#  I take it as a bug, and reported it to sourceforge.net, did I do that
wrong?

import win32ui,win32con,pythoncom,win32gui,win32process,win32api
pwin = win32gui.FindWindow(0,'D:\\labBufferSpace')
win32gui.BringWindowToTop(pwin)
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] BringWindowToTop doesn't work, anyone have try it?

2010-10-22 Thread Tim Roberts
nathon py wrote:
 #  Let's say a window with title 'D:\\labBufferSpace' exists.
 #  Code below does not work in DOS, or just double it.
 #  But it works well in  PythonWin.
 #  I do not want to run it in PythonWin every time.
 #  I take it as a bug, and reported it to sourceforge.net
 http://sourceforge.net, did I do that wrong?
 
 import win32ui,win32con,pythoncom,win32gui,win32process,win32api
 pwin = win32gui.FindWindow(0,'D:\\labBufferSpace')
 win32gui.BringWindowToTop(pwin) 

If it is a bug, it is a bug in the Win32 API.  This same code also does
not work in a console app written in C.

Use SetForegroundWindow instead of BringWindowToTop.  That works.

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] BringWindowToTop doesn't work, anyone have try it?

2010-10-22 Thread nathon py
guys, thanks a lot, i will try and share the result

2010/10/23 Tim Roberts t...@probo.com

 nathon py wrote:
  #  Let's say a window with title 'D:\\labBufferSpace' exists.
  #  Code below does not work in DOS, or just double it.
  #  But it works well in  PythonWin.
  #  I do not want to run it in PythonWin every time.
  #  I take it as a bug, and reported it to sourceforge.net
  http://sourceforge.net, did I do that wrong?
  
  import win32ui,win32con,pythoncom,win32gui,win32process,win32api
  pwin = win32gui.FindWindow(0,'D:\\labBufferSpace')
  win32gui.BringWindowToTop(pwin)

 If it is a bug, it is a bug in the Win32 API.  This same code also does
 not work in a console app written in C.

 Use SetForegroundWindow instead of BringWindowToTop.  That works.

 --
 Tim Roberts, t...@probo.com
 Providenza  Boekelheide, Inc.

 ___
 python-win32 mailing list
 python-win32@python.org
 http://mail.python.org/mailman/listinfo/python-win32

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32