#include <IE.au3>
#Include <Clipboard.au3>
#Include <ScreenCapture.au3>
Dim $i=0
$url="http://login.jyb.cn/regapply.php" ;含有验证码的页面
$name="image.php"
$oIE = _IECreate ($url,0,1,0)
sleep(5000)
$oImgs = _IEImgGetCollection ($oIE)
For $oImg In $oImgs
$i+=1
If $oImg.nameprop=$name Then
$oPic = $oIE.Document.body.createControlRange()
$oPic.Add($oImg)
$oPic.execCommand("Copy")
$img = ClipGet()
_ClipBoard_Open (0)
Local $hMemory = _ClipBoard_GetDataEx ($CF_BITMAP)
_ClipBoard_Close ()
_ScreenCapture_SaveImage (@ScriptDir & "\test.bmp", $hMemory)
EndIf
Next
|