Robert.Bartman
IS-IT--Management
I have this code that I have borrowed bits and pieces of from multiple sources. The object of this code is for a technician to click submit on what software packages need to be installed on a computer. Then the script needs to make a file with the same name as the value of that submit button. I know how to do this by creating seperate subroutines for each submit button, but I would like to have one sub routine that parses the necessary data to create the proper file name. Can I use the value property to pass this information over to vbscript? Here is the code:
Code:
<HEAD>
<TITLE>HTA Sample</TITLE>
<hta:application
applicationname="HTA Sample"
scroll="yes"
singleinstance'"yes"
>
</HEAD>
<SCRIPT language="vbscript">
Set objFSO=CreateObject("Scripting.FileSystemObject")
Sub dymo
str1 = "dymo"
outFile="c:\test\dymo.txt"
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.Write str1
objFile.Close
msgBox "File Created"
End Sub
</SCRIPT>
<BODY STYLE="FONT:10 pt verdana; COLOR:black; filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#FFCC66', EndColorStr='#FFFFFF')">
<input id=runbutton class= "button" type="button" value="Dymo" name="button1" onClick="dymo"><BR>
<input id=runbutton class= "button" type="button" value="RightFax" name="button2" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="Vidyo" name="button3" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="eCW Plugin Upgrade" name="button4" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="eCW EXE Test" name="button5" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="eCW Web Test" name="button6" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="2x" name="button7" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="Outlook" name="button8" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="Skype" name="button9" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="VPN" name="button1a" onClick="RunThisSubroutine"><BR>
<input id=runbutton class= "button" type="button" value="Banner" name="button2a" onClick="RunThisSubroutine"><BR>
</BODY>