資料來源:兄弟論壇
作者:我相信
Dim SvrName(14),xPost,HttpAdd,NowTime,StartTime
StartTime=Now
SvrName(1) = "time-nw.nist.gov"
SvrName(2) = "time-a.nist.gov"
SvrName(3) = "time-b.nist.gov"
SvrName(4) = "time-a.timefreq.bldrdoc.gov"
SvrName(5) = "time-b.timefreq.bldrdoc.gov"
SvrName(6) = "time-c.timefreq.bldrdoc.gov"
SvrName(7) = "utcnist.colorado.edu"
SvrName(8) = "time.nist.gov"
SvrName(9) = "nist1.datum.com"
SvrName(10) = "nist1.dc.glassey.com"
SvrName(11) = "nist1.ny.glassey.com"
SvrName(12) = "nist1.sj.glassey.com"
SvrName(13) = "nist1.aol-ca.truetime.com"
SvrName(14) = "nist1.aol-va.truetime.com"
Set xPost=createObject("Microsoft.XMLHTTP")
Set Obj=createObject("Wscript.shell")
While NowTime=""
i=1
For 14
HttpAdd="Http://"&SvrName(i)&":13":NowTime=""
xPost.Open "Put",HttpAdd,False
xPost.Send()
Delay 10
If xPost.readyState=4
NowTime=mid(xPost.responsetext,8,17)
If NowTime<>""
NowTime=CDate(NowTime) + 8 / 24
Goto EndConnect
Else
xPost.abort()
NowTime=""
EndIf
EndIf
i=i+1
EndFor
If DateDiff("s",StartTime,Now)>=30 And NowTime=""
Obj.popup "請確定你已經連接上了網際網路!",0,"網路時間"
Goto EndConnect
EndIf
EndWhile
Rem EndConnect
xPost.abort()
Set xPost=Nothing
If NowTime>CDate("2009-1-1")
//設定使用期限為2009-1-1之前
//期限已到
MessageBox "期限已到"
EndScript
EndIf
以上取時間部分的腳本轉自jimmyzs
這是一個可以限制使用期限的腳本,把這個腳本加到你的腳本的最上面就可以了
- Apr 20 Mon 2009 23:42
【按鍵精靈-高級篇】給腳本限制使用日期(轉貼)
close
全站熱搜
留言列表