VBScript : Différence entre versions

De UnixWiki
Aller à : navigation, rechercher
Ligne 12 : Ligne 12 :
 
debug.print VARIABLE_NAME
 
debug.print VARIABLE_NAME
 
</code>
 
</code>
  +
  +
Copy variable into the clipboard
  +
Set objIE = CreateObject("InternetExplorer.Application")
  +
objIE.Visible = False
  +
objIE.Navigate("about:blank")
  +
objIE.document.parentwindow.clipboardData.SetData "text", host
  +
objIE.Quit

Version du 10 avril 2018 à 10:55

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

Copy variable into the clipboard

  Set objIE = CreateObject("InternetExplorer.Application")
  objIE.Visible = False
  objIE.Navigate("about:blank")
  objIE.document.parentwindow.clipboardData.SetData "text", host
  objIE.Quit