On Error Resume Next
Set WMI = GetObject("Winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set A = WMI.ExecQuery("Select * From Win32_DesktopMonitor")
For Each B in A
W = B.ScreenWidth
H = B.ScreenHeight
Next
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "
http://zhidao.baidu.com
"
IE.AddressBar = 0
IE.ToolBar = 0
IE.StatusBar = 0
IE.Visible = 1 'Visible数值0隐藏,1最小化,2新窗口'''''''
IE.Left = (W - 800) / 2
IE.Top = (H - 640) / 2
IE.Width = 800
IE.Height = 640
Set O = IE.Document
Do Until i = 100 '100代表刷新100次
i = i + 1
Wscript.Sleep 1000*60*1 '最后1代表每隔1分钟刷新
O.Location.Reload(True)
If Err <> 0 Then
CreateObject("WScript.Shell").Popup "错误:"& Err.Description ,6,"错误提示",4096+64 :IE.Quit :Wscript.Quit
End If
Loop
IE.Quit
CreateObject("WScript.Shell").Popup "任务以完成,窗口已关闭",6,"提示",4096+64
vbs 打开网页
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章