Board logo

标题: 能不能用批处理或vbs编出这样的程序? [打印本页]

作者: anqing     时间: 2007-2-21 07:19    标题: 能不能用批处理或vbs编出这样的程序?
能不能用批处理或vbs编出这样的程序?
全屏依次红色字体显示:10,9,8。。。。。。1



由于是全屏,所以,这十个倒计时的数字,要很大,最起码,也要是在全屏的中心!
用flash,可以做出,不知用p和vbs能不能做出来?

作者: zh159     时间: 2007-2-21 09:04
原脚本来自 http://www.cn-dos.net/forum/viewthread.php?tid=23802 第 8 楼

intTime = 10
If WScript.Arguments.Count <> 0 Then intTime = WScript.Arguments(0)
set WshShell = Wscript.CreateObject("Wscript.Shell")
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Navigate "about:blank"
.FullScreen = 1
.Height = 300
.Width = 300
.Left = fix((.document.parentwindow.screen.availwidth - .Width)/2)
.Top = fix((.document.parentwindow.screen.availheight - .Height)/2)

.Visible = 1
.Document.write "<html><title>倒计时</title><body bgcolor=beige scroll=no></body></html>"
Set objBody = .Document.Body
End With

For i = 1 To intTime
WScript.Sleep 1000
objBody.InnerHtml = "<table align=center style='font-family:黑体;font-size:250px;color=red;'><td>" & _
intTime - i & "</td></table>"
Next

objIE.Quit
Set objBody = Nothing
Set objIE = Nothing

作者: anqing     时间: 2007-2-21 09:19
挺漂亮的。不错,
谢谢!

作者: anqing     时间: 2007-2-21 11:19
感觉更像是asp