本帖最后由 hackiller 于 2010-1-31 09:43 编辑
http://www.10010.com/login.jsp页面的
图片链接
http://www.10010.com/getImage.jsp $ogetiamge = _IEFrameGetObjByName($oIE, 'ifm_WebCheckCode')
$oImgs = _IEImgGetCollection($ogetiamge)
For $oImg In $oImgs
$i += 1
If $oImg.src = "http://www.10010.com/getImage.jsp" Then
$oPic = $ogetiamge.Document.body.createControlRange()
$oPic.Add($oImg)
$oPic.execCommand("Copy")
$img = ClipGet()
EndIf
Next
_GDIPlus_Startup()
_ClipBoard_Open(0)
$iVerifyPics = _ClipBoard_GetDataEx($CF_BITMAP)
$iVerifyPics = _GDIPlus_BitmapCreateFromHBITMAP($iVerifyPics)
_ClipBoard_Close()
FileDelete(@TempDir & "\getimage.bmp")
_GDIPlus_ImageSaveToFile($iVerifyPics, @TempDir & "\getimage.bmp")
$a_Image = myReadImageToArray(@TempDir & "\getimage.bmp", True, 1, 0x777777);71704
$a_Image = myArrayDelBox($a_Image, 1, 1, 1, 1);去边框
$s_code_string = myArrarOCR(@ScriptDir & "\CodeFont.txt", $a_Image, 1, $CodeNum, $CodeWidth, "", $func_left, $func_mid, $func_top, $func_bottom)
$check = _IEGetObjById($oIE, "MobileCheckCode")
If IsObj($check) Then $check.value = $s_code_string
|