#include <IE.au3>
GUICreate("报价信息", -1, -1, -1, -1)
GUISetState(@SW_HIDE)
_IEErrorHandlerRegister()
$oie = ObjCreate("Shell.Explorer.2")
$GUIACTIVEX = GUICtrlCreateObj($oie, -1, -1,-1, -1)
$oie.navigate("http://3.baring.cn/quo/bin/quotation.dll/page/pageinfo.html?page=http://3.baring.cn/quo/bin/quotation.dll/page/ytcj.com.CURR.htm")
Local $Ele1
_IELoadWait($oie)
Sleep(4000)
$oie = _IEAttach("报价信息", "Embedded")
$huangjin = _IETagNameGetCollection($oie,"TD",2)
$huangjin = StringRegExp($huangjin.outerhtml, "(\d*\.\d*)", 3)
$baiyin = _IETagNameGetCollection($oie,"TD",12)
$baiyin = StringRegExp($baiyin.outerhtml, "(\d*\.\d*)", 3)
MsgBox(0,"提取结果","现货黄金 最新"&$huangjin[0]&@CR&"现货白银 最新"&$baiyin[0])
|