i am making an .hta app with vbscript primarily along with using a .vbs file and two batch files.. everything is working good except after doing some fixes for other stuff; i am getting an error that objshell is undefined when attempting to write a text box to "input.txt"
"set objshell = createobject("wscript.shell")" is where the problem is.
please help i am new
"set objshell = createobject("wscript.shell")" is where the problem is.
please help i am new
HTML Code:
<script language="vbscript">
option explicit
Const ForWriting = 2
Dim objFSO, objFile, strFileName
strFileName = "input.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, 2, true)
Set objshell = CreateObject("WScript.Shell")
Sub Submitarea
Set objFile = objFSO.OpenTextFile(strFileName, 2, True)
objfile.Write TextFile.Value
objFile.Close
MsgBox "Your text has been added to " & strFileName, 64, "Textarea Input"
End Sub
</script>
<textarea name="TextFile" id="TextFile" rows="20" cols="50"></textarea>
<input type="button" value="Submit" onclick="Submitarea">