希望这将是一个容易的吗?我有一个VBS文件,我试图每周安排一次XML刷新。它只是调用一个ASPX页面。但我无法让这个东西工作!即使当我尝试双击VBS文件时,我也会收到一条错误消息。实际的代码可以在整个地方找到 - 它似乎是为此目的的标准代码。windows任务计划打开一个网页 - vbs不工作
的代码是(fetch.vbs)
Call LogEntry()
Sub LogEntry()
'Force the script to finish on an error.
On Error Resume Next
'Declare variables
Dim objRequest
Dim URL
Set objRequest = CreateObject("Microsoft.XMLHTTP")
'Put together the URL link appending the Variables.
URL = "http://mywebsite/fetchXML.aspx"
'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "POST", URL , false
'Send the HTML Request
objRequest.Send
'Set the object to nothing
Set objRequest = Nothing
End Sub
的错误信息,我从窗户弄(当我双击VBS文件)
Script: fetch.vbs
Line: 1
Char: 1
Error: Invalid Character
Code: 800A0408
Source: Microsoft VBScript Compilation Error
任何想法?
整理...这是因为我还没有保存为ANSI(从这里回答:http://stackoverflow.com/questions/2039104/vbscript-invalid-character-800a0408-compilation-error) –