[python-win32] Selecting OK button in dialog
mjohnson at mpjconsultancy.com
Thu Oct 11 11:40:12 CEST 2007
I know this has been discussed elsewhere, maybe even on this board. But I am getting spooky things happening, can anyone shed any light please?
I enumerate through the windows until I find the one I want, then using
childWindows = 
win32gui.EnumChildWindows(window, windowEnumerationHandler, childWindows)
for child in childWindows:
win32gui.SendMessage(child, win32con.WM_LBUTTONDOWN, 0, 0)
win32gui.SendMessage(child, win32con.WM_LBUTTONUP, 0, 0)
I click the OK button.
If I watch the execution on the screen I can see the OK button depressed then released, but nothing happens. The spooky part is that if I then move the mouse over the dialog with the OK button then the action is performed.
I guess there is something else needed, perhaps focus.
All hints and tips gratefully received, thanks
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the python-win32