比如,这样操作,则将验证码图片并复制到GUI界面:#include <ClipBoard.au3>
#include <GUIConstants.au3>
#include <IE.au3>
GUICreate("",300,700)
GUISetState()
$pic=GUICtrlCreatePic("",5,600,100,50)
$oIE=_IECreate("http://m.dangdang.com/register_email.php?sid")
$oImg = _IEImgGetCollection ($oIE,1)
$oPic = $oIE.Document.body.createControlRange()
$oPic.Add($oImg)
$oPic.Select()
$oPic.execCommand("Copy")
$img = ClipGet()
GUICtrlSetImage($pic,$img)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
而如果把IE内嵌在GUI里,却读不出来,求助哦,
内嵌IE的代码为:#include <ClipBoard.au3>
#include <GUIConstants.au3>
#include <IE.au3>
GUICreate("",300,700)
GUISetState()
$oIE=_IECreateEmbedded()
GUICtrlCreateObj($oIE, 5, 5, 330, 550);嵌入式ie控件
$pic=GUICtrlCreatePic("",5,600,100,50)
_IENavigate($oIE, "http://m.dangdang.com/register_email.php?sid", 1);注册页面
$oImg = _IEImgGetCollection ($oIE,1)
$oPic = $oIE.Document.body.createControlRange()
$oPic.Add($oImg)
$oPic.Select()
$oPic.execCommand("Copy")
$img = ClipGet()
GUICtrlSetImage($pic,$img)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|