|
发表于 2008-9-22 11:26:16
|
显示全部楼层
$g_szVersion = "My"
If WinExists($g_szVersion) Then
MsgBox(32,"","注意已经运行了")
Exit ; 此脚本已经运行了
EndIf
AutoItWinSetTitle($g_szVersion)
;########################################以上是确保只有一个脚本实例运行##################################
#include <IE.au3>
#include <Inet.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 20, 228, 254,$WS_POPUP, $WS_EX_TOOLWINDOW)
GUISetState(@SW_SHOW)
$str=_INetGetSource("http://news.163.com/")
$a=StringInStr($str,'<marquee')
$b=StringInStr($str,'</marquee></h3>')
$c=StringMid($str,$a,$b+StringLen("</marquee></h3>")-$a)
$c=StringReplace($c,"</h2>","")
$a2=StringInStr($str,'<style type="text/css">')
$b2=StringInStr($str,'</style>')
$c2=StringMid($str,$a2,$b2+StringLen("</style>")-$a2)
$html="<head>"&$c2&"</head><body>"&$c&"</body>"
$oIE = _IECreateEmbedded()
$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 520, 20)
_IENavigate ($oIE, "about:blank")
_IEDocWriteHTML ($oIE,$html)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd |
|