Python vs VB

Alex Martelli aleax at aleax.it
Mon May 19 05:05:57 EDT 2003


On Monday 19 May 2003 10:57 am, vivek kumar wrote:
> From: Alex Martelli <aleax at aleax.it>
> Date: Mon, 19 May 2003 06:51:17 GMT
>
> >vivek kumar wrote:
> >>For this he also gave me a hint that for this U have to first get the
> >>handle for that particular widget and he used some windows API for that.
> >>But as I was not a good student in VC++ also, so I don't know what API
> >> can be used for that. :-(
> >
> >You use EXACTLY the same Windows API for this task from either Basic or
> >Python.  It makes no difference which language you're calling the
> >appropriate API from.  Thus, it's a silly way to compare two languages.
> >
> :-( As I was not a good student in VC++ also, so I don't have any idea of
>
> what API he has used for this.  But I will try to find some API for this
> thing in MSDN..

I think you may want the EnumerateWindows call, or FindWindowEx, or 
something of that ilk, but checking on MSDN is undoubtedly best.  

http://mail.python.org/pipermail/python-win32/2002-December/000635.html
and other messages of that thread may prove helpful (there's a specific
reference to "Python script to clickOK" and that sounds promising;-).


> >BTW: to call Windows API's from Python you need Hammond's win32all
> >extensions (the standard Python distribution for Windows does not
> >include them; you can either get the ActiveState distribution, or get
> >the standard distribution, get the win32all extensions separately,
> >and install the latter on top of the former).
>
> THX a lot for this. I have a standard Python distro but I have searched for
> win32all and have downloaded it. And will try to find out the way to do the
> same thing in Python( first how to call a windows API in Python :-).

The archives of the python-win32 mailing list, of which the above mentioned
thread is part, may be useful to you here -- assuming you do really need
to do such windows-specific stuff of course.


Alex






More information about the Python-list mailing list