Monday, July 3, 2017

vbs tuta

Option Explicit
Dim result, objFSO, outFile, objFile 
result = InputBox("zapisi ovo:", "title", "default unos", 100, 100)
WScript.Echo result  

'Set objFSO = CreateObject("Scripting.FileSystemObject")

' How to write file
'outFile="c:\test\probator.txt"
'Set objFile = objFSO.CreateTextFile(outFile,True)
'objFile.Write "test string: " & result & vbCrLf
'objFile.Close


Dim objStream
Set objStream = CreateObject("ADODB.Stream")
objStream.CharSet = "utf-8"
objStream.Open
objStream.WriteText result
objStream.SaveToFile "c:\test\probator.txt", 2



WScript.Echo "totovo"