vb.net - Using FileSystemObject to Export VBScript Code to Text File -


I export the part of the code below to replace the MsgBox oXMLHttp.responseText code I am checked out the result of a text file and found the following code:

set objFSO = CreateObject ("Scripting.FileSystemObject")

  'file how to write? Set file = "c: \ test \ Autorun.inf" objFile = objFSO.CreateTextFile (outfile, true) obz file. Type "test string" & amp; VbCrLf objFile.Close   

However, I do not know how to implement it actually. Is the location and name of the outfile file to be made? I believe this is it. But then what is the purpose of objFile.Write "test string"? VbCrLf ? My main question is that I am telling FileSystemObject to process the code based on the code given below?

  dim request, oXMLHttp, url url = "http: //ws.cdyne com / phoneverify / phoneverify.asmx" request = " "& Amp; _" & lt; String & gt; 2 & lt; / String> "& Amp; _" & lt; String & gt; 3 & lt; / String> "& Amp; _" & lt; String & gt; 4 & lt; / String> "& Amp; _" & lt; String & gt; 5 & ​​lt; / String> "& Amp; _" & lt; String & gt; 6 & lt; / String> "& Amp; _" & lt; String & gt; 7 & lt; / String> "& Amp; _" & lt; String & gt; 8 & lt; / String> "& Amp; _" & lt; String & gt; 9 & lt; / String> "& Amp; _" & lt; String & gt; 10 & lt; / String> "& Amp; _" & lt; / PhoneNumbers & gt; "& Amp; _" & lt; License Key & gt; Key & lt; / LicenseKey> "& Amp; _" & lt; / Checkphone bonus & gt; "& Amp; _" & lt; / Soap: Body & gt; "& Amp; _" & lt; / Soap: envelope> "set oXMLHttp = CreateObject (" MSXML2.ServerXMLHTTP ") oXMLHttp.open" post ", url, false oXMLHttp.setRequestHeader" content type "," text / xml; Charset = utf-8 "oXMLHttp.send request response = oXMLHttp.responseText MsgBox oXMLHttp.responseText    

< Ol>
  • Create:

      set objFSO = CreateObject ("Scripting.FileSystemObject")    
  • One Use this to create the object file you want to create ( CreateTextFile function):

      set objFile = objFSO.CreateTextFile ("c: \ yourfile .txt ", this is true)    
  • TextStream object ( objFile ):

    In your case, it seems that you would like to write an HTTP response:

      objFile  
  • / Li>

  • Comments

    Popular posts from this blog

    java - ImportError: No module named py4j.java_gateway -

    python - Receiving "KeyError" after decoding json result from url -

    .net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -