Kelie wrote:
> for every 0.1 second, check the active application or current
> application, or active window? (I don't know what is the correct
> term.) if it is AutoCAD (meaning user is using AutoCAD), turn on the
> CapsLock, if it is Microsoft Word (meaning user is using Word), turn
> off the CapsLock.

Well your best bet is to look at WATSUP:

   http://www.tizmoi.net/watsup/intro.html

or at pywinauto:

   http://sourceforge.net/projects/pywinauto

but I'm not convinced that what you're trying to do is
A Good Thing ;)

> Oh, the reason I check the active application for every 0.1 second is
> I don't know how to do it otherway.  Is there an event that
> corresponds to the active application/window change?

It's a long while since I did lowish-level Windows stuff in earnest.
I suspect you'd have to install a system message hook and look for
WM_ACTIVATE messages or something similar. Perhaps someone more
knowledgeable here can chip in...?

TJG
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to