[python-win32] 回复: The program passes on Win7 but fails on Win8
Tim Roberts
timr at probo.com
Thu Jan 3 18:55:06 CET 2013
震坤 蔡 wrote:
> Thanks for your reply.
> For the program I have written:
> print "abc"
> hWindow = win32gui.FindWindow('MsiDialogCloseClass', None)
> if hWindow <> 0:
> print hWindow
> hButton = win32gui.FindWindowEx(hWindow, 0, 'Button', '&Next >')
> if hButton <> 0:
> print hButton
> win32gui.SendMessage(win32gui.GetParent(hButton), win32con.WM_COMMAND, win32con.BN_CLICKED, hButton)
> else:
> print "ghi"
> else:
> print "def"
> The hWindow and hButton can both be printed out and they are both not 0.
> The application does not crash but the Next button click action is not
> triggered.
No, of course not, because the SendMessage call is still wrong. Did you
even read my reply? The third parameter is wrong.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list