|
<a href="save.asp?action=delete&id=58131&page=0" class="b"><img src="../imges/delete.jpg" width="57" height="21" border="0"></a>
用_IEImgClick点击图片后弹出对话框,再用send("{Enter}")、controlclick("Microsoft Inernet Explorer","您要删除此信息吗","[CLASS:button;INSTANCE:1]")都未能执行
搜索坛子里,发现有人用_IEAction解决了,但是我测试却是不行啊,代码如下,请各位指教啊??
$oImgs = _IEImgGetCollection($oIE)
For $oImg In $oImgs
if $oImg.src == '../imges/delete.jpg' then
$hwnd = _IEPropertyGet($oIE, "hwnd")
_IEAction($oImg, "focus")
ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}")
WinWait("Microsoft Internet Explorer", "")
ControlClick("Microsoft Internet Explorer", "", "[CLASS:Button; Instance:1;]")
endif
Next |
|