震坤 蔡 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, [email protected]
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32