本帖最后由 superlsw2008 于 2011-8-24 00:58 编辑 #include <IE.au3>
#include <GUIConstants.au3>
#include <ClipBoard.au3>
#include <GDIPlus.au3>
#include <Winapi.au3>
$OpenPage = _IECreate("http://reg.email.163.com/mailregAll/reg0.jsp")
$iVerifyPic = _IEImgGetCollection($OpenPage, 1)
_GDIPlus_Startup()
$iVerifyPics = $OpenPage.Document.body.createControlRange()
$iVerifyPics.add($iVerifyPic)
$iVerifyPics.Select ()
$iVerifyPics.execCommand('Copy')
Sleep(500)
_ClipBoard_Open(1)
$iVerifyPics = _ClipBoard_GetDataEx($CF_BITMAP)
$iVerifyPics = _GDIPlus_BitmapCreateFromHBITMAP($iVerifyPics)
_ClipBoard_Close()
;FileDelete(@TempDir & "\VerifyPic.bmp")
_GDIPlus_ImageSaveToFile($iVerifyPics, @TempDir & "\VerifyPic.bmp")
GUICreate("VerifyPic", 150, 150, -1, -1, -1)
GUISetBkColor(0xFFFFFF)
GUISetState()
$Img = GUICtrlCreatePic(@TempDir & "\VerifyPic.bmp", 10, 20, 80, 30)
_GDIPlus_BitmapDispose($iVerifyPics)
_GDIPlus_Shutdown()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then
GUIDelete()
ExitLoop
EndIf
WEnd
|