中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » vbs的rss2html——今晚最后一个帖子
作者:
标题: vbs的rss2html——今晚最后一个帖子 上一主题 | 下一主题
electronixtar
铂金会员





积分 7493
发帖 2672
注册 2005-9-2
状态 离线
『楼 主』:  vbs的rss2html——今晚最后一个帖子

http://www.bytescout.com/rss2htmlscout_example_vbscript.html

  Quote:
How to convert RSS into HTML page using RSS2HTML Scout library and Visual Basic Script (VBScript): "Hello, World!" example

You can download the source code of this example here: rss2htmlscout_vbscript.zip

This page provides a simple example for RSS2HTML Scout to show how to start with RSS2HTML Scout library and Visual Basic Script (VBScript).

RSS2HTML Scout is capable of downloading RSS feeds using built-in multi-threaded and converting RSS into HTML code using HTML templates (check online documentation for more information about templates)
Download and install the latest version of RSS2HTML Scout. You can download it here

2) Run Notepad

3) To convert RSS into HTML and then save generated HTML code into file we will create a very simple script using VBScript scripting language:

Set RSS2HTML = CreateObject("RSS2HTMLScoutLib.RSS2HTMLScout")

RSS2HTML.ItemsPerFeed = 10 ' display only 5 latest items from every feed
' ##### we can add more than one RSS feed #########
RSS2HTML.AddFeed  "http://bytescout.com/news.xml", 180 ' update every 180 minutes (3 hours)

RSS2HTML.Execute

RSS2HTML.SaveOutputToFile "Output.html"

Set RSS2HTML = nothing

Just copy and paste code from this page into notepad and save it as a "Convert.VBS" file.

4) Double-click "Convert.VBS" file in Explorer or in another file manager and VBScript .VBS file will be executed by Windows.
The script will generate "Output.html"  file.

You can view this HTML file using Internet Explorer or another browser. To display HTML files in your Visual Basic application please use WebBrowser control




You can download the source code of this example here: rss2htmlscout_vbscript.zip



附件 1: rss2html.rar (2006-10-3 11:15, 417 bytes, 下载附件所需积分 1 点 ,下载次数: 36)



C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
2006-10-3 11:15
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: