我试图让这个脚本在 Windows 上作为计划任务运行,使用在线编译器进行检查,消息 VBNC30203 标识符错误被突出显示,我已查看此消息,但没有实施修复的技能,任何帮助受到赞赏。
脚本的来源是:
http://www.642weather.com/weather/wxblog/php-scripts/scheduled-http-request-windows-task-scheduler/
我只是在脚本中输入了我的 URL/文件名。
这是我的VBS代码:
Call LogEntry()
Sub LogEntry()
'Force the script to finish on an error.
On Error Resume Next
'Declare variables
Dim objRequest
Dim URL
'The URL link.
URL = "http://www.chatteris.biz/forecast-compare-include.php?log&config=am"
Set objRequest = CreateObject("Microsoft.XMLHTTP")
'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "GET", URL , false
'Send the HTML Request
objRequest.Send
'Set the object to nothing
Set objRequest = Nothing
End Sub
Run Code Online (Sandbox Code Playgroud) vbscript ×1