本帖最后由 ajian55 于 2012-9-4 14:38 编辑
我是冲着Q币来的~#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$oIE = _IECreateEmbedded ()
$hWin = GUICreate("Embedded Web control Test", 640, 580)
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 640, 580)
;GUISetState() ;显示窗口
_IENavigate ($oIE, "http://www.okooo.com/fastlottery/PK10/shahao/n2")
_IELoadWait($oIE)
$htmltxt = _IEBodyReadText ( $oIE )
$qihao = StringRegExp($htmltxt, "(.*?)当前期杀号", 3)
$lastqihao = Number($qihao[0])-1
$kaijiang = StringRegExp($htmltxt, $lastqihao&"(.{29})", 3)
MsgBox(0,"元素html",$kaijiang[0], 3, $hWin)
$kaijiang0 = $kaijiang[0]
AdlibRegister("MyAdlib", 30000) ;每30秒刷新一次
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
GUIDelete()
Exit
Func MyAdlib()
_IENavigate ($oIE, "http://www.okooo.com/fastlottery/PK10/shahao/n2")
$htmltxt = _IEBodyReadText ( $oIE )
$qihao = StringRegExp($htmltxt, "(.*?)当前期杀号", 3)
$lastqihao = Number($qihao[0])-1
$kaijiang = StringRegExp($htmltxt, $lastqihao&"(.{29})", 3)
If $kaijiang[0] <> $kaijiang0 Then
MsgBox(0,"元素html",$kaijiang[0], 3, $hWin)
$kaijiang0 = $kaijiang[0]
EndIf
EndFunc
|