#include <IE.au3>
#include <GUIConstants.au3>
#include <ClipBoard.au3>
#include <GDIPlus.au3>
#include <Winapi.au3>
$OpenPage = _IECreate("https://passport.baidu.com/?reg")
$iVerifyPic = _IEImgGetCollection($OpenPage, 2)
_GDIPlus_Startup()
$iVerifyPics = $OpenPage.Document.body.createControlRange()
$iVerifyPics.add($iVerifyPic)
$iVerifyPics.Select ()
$iVerifyPics.execCommand('Copy')
Sleep(500)
_ClipBoard_Open(0)
$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, _GDIPlus_ImageGetWidth($iVerifyPics), _GDIPlus_ImageGetHeight($iVerifyPics))
_GDIPlus_BitmapDispose($iVerifyPics)
_GDIPlus_Shutdown()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then
GUIDelete()
ExitLoop
EndIf
WEnd
|