sark 发表于 2008-9-19 20:28:16

制作“滚动新闻”的软件!

请问一个单独显示“滚动新闻”的软件并能自动/手动更新!
我试过,问题就在如何提取“关键字”。
但还是不成功!
请仁兄指教!
原地址:http://news.163.com/

绿色框就是要提取的框架!

[ 本帖最后由 sark 于 2008-9-19 20:31 编辑 ]

sark 发表于 2008-9-20 18:14:40

没人回答!

huangke 发表于 2008-9-20 22:23:05

我来帮你顶一下,我不知道怎么做,用AU3的话`

auto 发表于 2008-9-20 23:17:56

好像没有框架..直接生成一个html页面,,..分板源码后..取其中所需部分就可以了
刚好有滚动新闻关键字,,应该可以弄的

sark 发表于 2008-9-21 08:39:20

用以前网友提取关键字的方法试过了!
可是软件显示中“0”!
不知道为什么?

gto250 发表于 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

anyky123 发表于 2009-11-24 10:10:14

:face (39):

l100593120 发表于 2009-11-24 11:51:00

:face (14): 一般高手都会出现在这里!~

huangke 发表于 2009-11-24 13:33:33

很多高手?
页: [1]
查看完整版本: 制作“滚动新闻”的软件!