Salve a tutti.![]()
Ho questo bel programmino fatto in vbs nel suo bel file .vbs
In pratica mediante l'oggetto XMLHTTP chiamo una pagina che poi dovrei salvare dentro un file di testo, all'interno di una cartella che creo poco prima.codice:url = "http://localhost/intranetroot/index.html" intranet = "http://localhost/" basePath = "C:\inetpub\cpsintranetroot\homepage\" iYear = datePart("yyyy",date()) iMonth = datePart("m",date()) if iMonth < 9 then iMonth = "0" & iMonth iDay = datePart("d",date()) if iDay < 9 then iDay = "0" & iDay dateFolder = iYear & iMonth & iDay set xmlhttp = createObject("MSXML2.ServerXMLHTTP") xmlhttp.open "GET", url, false xmlhttp.send contentPage = xmlhttp.responseText set xmlhttp = nothing contentPage = replace(contentPage,"src=""/", "src=""" & intranet) contentPage = replace(contentPage,"href=""/", "href=""" & intranet) contentPage = replace(contentPage,"open('/", "open('" & intranet) contentPage = replace(contentPage,"url(/", "url(" & intranet) set fso = createObject("scripting.fileSystemObject") if fso.folderExists(basePath & dateFolder) = false then set folder = fso.createFolder(basePath & dateFolder) set folder = nothing end if set createHomepage = fso.createTextFile(basePath & dateFolder & "\index.html", true) createHomepage.writeLine contentPage createHomepage.close set createHomepage = nothing set fso = nothing
Il problema è che alla riga in rosso ho questo errore:
Script: (percorso del file .vbs)
Riga: 35
Carattere: 4
Errore: Chiamata di routin o argomento non validi
Codice: 800A0005
Origine: Errore di run-time di Microsoft VBScript
Capita anche a me... non so più dove sbattere la testa...
![]()

Rispondi quotando
:maLOL:
