Where does the hardcoded 99999 come from in this line ? win32api.PostMessage(hwnd,message,1,99999)
If I'm interpreting the docs correctly, that parm should be a handle to a top-level window you create yourself that receives messages from the app. Also, you'll need to be running a message loop to receive messages (see win32gui.PumpMessages). Roger "Joe Bennett" <jammer10...@ka3nam.com> wrote in message news:cad+1-4-_coysp3h1gfgef4dh3rgvr3u4avk4zqhiyenu5ab...@mail.gmail.com... > Hi, > > Looking for a good simple remedial course on getting my python script > to talk to a Windows program. The author of the windows program has > documented the api here: > > http://www.logger32.net/help/Logger32/Using%20the%20Logger32%20External%20Interface.htm > > > I'm struggling to understand how to implement the messages with > win32api/ gui... I've taken a stab at it here based on my searching > the web with my first goal being that I just want to 'register' with > the program and receive the response > from it. So far I'm still scratching my head over this... > > I get a response for 'hwnd' but have not been able to get any > confirmation that RegisterMessage, PostMessage and GetMessage are > working, configured properly or...what... > > Running this all in WIN7 with ActivePython 2.6.6... > > > import win32api > import win32gui > > hwnd = win32gui.FindWindowEx(0, 0, 0, "Logger32") > > > print "hwnd= ", hwnd > > message = win32api.RegisterWindowMessage("Logger32 3") > > > win32api.PostMessage(hwnd,message,1,99999) > > test = win32gui.GetMessage(hwnd,0,0) > > print "GetMessage: ", test > > > > Thanks!!!! > > > -Joe > KA3NAM _______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32