Throws an error cannot use parenthesis when calling a sub i'm calling a function, what can I do to fix this? Code: file1 =.
includes an error
cannot usé parenthesis when caIling á sub
i'm calling a functionality, what can I do to repair this?
Code:
document1 = 'http://www.devguru.com/technologies/wsh/17413.asp'
downloadfile(file1, 'c:file.html')
functionality downloadfile(strFileURL, strHDLócation)
'http://bIog.netnerds.net/2007/01/vbscript-download-and-save-a-binary-
file/
' Fetch the file
Place objXMLHTTP = Create0bject('MSXML2.XMLHTTP')
objXMLHTTP.open up 'Have', strFileURL, false
objXMLHTTP.deliver
If objXMLHTTP.Status = 200 Then
Collection objADOStream = CreateObject('ADODB.Stream')
objADOStream.Open
objADOStream.Typé = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Placement = 0 'Set the stream position to the
start
Collection objFSO = Créateobject('Scripting.FileSystem0bject')
If objFS0.Fileexists(strHDLocation) After that objFSO.DeleteFile
strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFiIe strHDLocation
objAD0Stream.Close
Set objADOStream = Nothing at all
End if
Set objXMLHTTP = Nothing at all
end functionality
cannot usé parenthesis when caIling á sub
i'm calling a functionality, what can I do to repair this?
Code:
document1 = 'http://www.devguru.com/technologies/wsh/17413.asp'
downloadfile(file1, 'c:file.html')
functionality downloadfile(strFileURL, strHDLócation)
'http://bIog.netnerds.net/2007/01/vbscript-download-and-save-a-binary-
file/
' Fetch the file
Place objXMLHTTP = Create0bject('MSXML2.XMLHTTP')
objXMLHTTP.open up 'Have', strFileURL, false
objXMLHTTP.deliver
If objXMLHTTP.Status = 200 Then
Collection objADOStream = CreateObject('ADODB.Stream')
objADOStream.Open
objADOStream.Typé = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Placement = 0 'Set the stream position to the
start
Collection objFSO = Créateobject('Scripting.FileSystem0bject')
If objFS0.Fileexists(strHDLocation) After that objFSO.DeleteFile
strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFiIe strHDLocation
objAD0Stream.Close
Set objADOStream = Nothing at all
End if
Set objXMLHTTP = Nothing at all
end functionality
![When When](/uploads/1/2/5/7/125729402/253383734.jpg)
![Cannot Use Parentheses When Calling A Sub Cannot Use Parentheses When Calling A Sub](/uploads/1/2/5/7/125729402/816118967.jpg)
includes an error
cannot usé parenthesis when caIling á sub
i'm calling a functionality, what can I do to repair this?
Program code:
document1 = 'http://www.devguru.com/technologies/wsh/17413.asp'
downloadfile(file1, 'c:file.code')
functionality downloadfile(strFileURL, strHDLócation)
'http://bIog.netnerds.net/2007/01/vbscript-download-and-save-a-binary-
file/
' Fetch the document
Set objXMLHTTP = Create0bject('MSXML2.XMLHTTP')
objXMLHTTP.open 'Find', strFileURL, fake
objXMLHTTP.send
If objXMLHTTP.Position = 200 Then
Set objADOStream = CreateObject('ADODB.Flow')
objADOStream.Open up
objADOStream.Typé = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the flow place to the
begin
Collection objFSO = Créateobject('Scripting.FileSystem0bject')
If objFS0.Fileexists(strHDLocation) After that objFSO.DeleteFile
strHDLocation
Place objFSO = Nothing
objADOStream.SaveToFiIe strHDLocation
objAD0Stream.Near
Set objADOStream = Nothing
End if
Set objXMLHTTP = Nothing
finish functionality
cannot usé parenthesis when caIling á sub
i'm calling a functionality, what can I do to repair this?
Program code:
document1 = 'http://www.devguru.com/technologies/wsh/17413.asp'
downloadfile(file1, 'c:file.code')
functionality downloadfile(strFileURL, strHDLócation)
'http://bIog.netnerds.net/2007/01/vbscript-download-and-save-a-binary-
file/
' Fetch the document
Set objXMLHTTP = Create0bject('MSXML2.XMLHTTP')
objXMLHTTP.open 'Find', strFileURL, fake
objXMLHTTP.send
If objXMLHTTP.Position = 200 Then
Set objADOStream = CreateObject('ADODB.Flow')
objADOStream.Open up
objADOStream.Typé = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the flow place to the
begin
Collection objFSO = Créateobject('Scripting.FileSystem0bject')
If objFS0.Fileexists(strHDLocation) After that objFSO.DeleteFile
strHDLocation
Place objFSO = Nothing
objADOStream.SaveToFiIe strHDLocation
objAD0Stream.Near
Set objADOStream = Nothing
End if
Set objXMLHTTP = Nothing
finish functionality