VBScript : Différence entre versions

De UnixWiki
Aller à : navigation, rechercher
Ligne 4 : Ligne 4 :
 
Write in a text file
 
Write in a text file
 
Set objFSO=CreateObject("Scripting.FileSystemObject")
 
Set objFSO=CreateObject("Scripting.FileSystemObject")
outFile="C:\Users\User\Desktop\Results.txt"
+
outFile=CreateObject("WScript.Shell").SpecialFolders("Desktop") + "\stage1.txt"
Set objFile = objFSO.CreateTextFile(outFile,True)
+
Set objFile = objFSO.CreateTextFile(outFile,True
 
objFile.WriteLine variable
 
objFile.WriteLine variable
   

Version du 5 février 2018 à 13:57

Print text

  Wscript.echo("text")

Write in a text file

  Set objFSO=CreateObject("Scripting.FileSystemObject")
  outFile=CreateObject("WScript.Shell").SpecialFolders("Desktop") + "\stage1.txt"
  Set objFile = objFSO.CreateTextFile(outFile,True
  objFile.WriteLine variable

If you can't see all the variable value with the watch point, you can open immediate window View--> Intermediate Window or CTRL-G and type debug.print VARIABLE_NAME