本帖最后由 fenhanxue 于 2015-11-12 03:18 编辑
如这样的验证码,是动态图的,应该怎么保存?
https://captcha.yhd.com/public/getgif.do?
我这样保存下来的是静态的图片,应该怎么改?#include<IE.au3>
#Include <Clipboard.au3>
#Include <ScreenCapture.au3>
$url = 'https://captcha.yhd.com/public/getgif.do?'
$oIE = _iecreate($url)
$oImgs = _IEImgGetCollection ($oIE)
For $oImg In $oImgs
If StringInStr($oImg.nameprop,'getgif.do?') 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 ('1.gif', $hMemory)
EndIf
Next
|