arlanne2 Posted September 20, 2011 Posted September 20, 2011 hi, can any one code me a vbscript that can input a multiple entry of name, username, middlename in one box or window. TIA
arlanne2 Posted September 20, 2011 Author Posted September 20, 2011 (edited) ups...inside the window box you can enter your name, your middle name address etc. any help woulb be prety much appreciated. TIAex. inside the boxEnter Your Name:Enter Your Middle Name:Enter Your Address: Edited September 20, 2011 by arlanne2
allen2 Posted September 20, 2011 Posted September 20, 2011 (edited) Even if it's not pure vbs, google is friend friend and would have found this or this or even this. You ned to remove html tags and save it as vbs if you need a plain vbs. Edited September 20, 2011 by allen2
gunsmokingman Posted September 20, 2011 Posted September 20, 2011 Here is a HTA using VBS script, it has 8 textboxes<!-- Created By Gunsmokingman Aka Jake1Eye 12:05 PM September-20-11--><TITLE>Demo User Input</TITLE><HTA:APPLICATION ID="Demo User Input" APPLICATIONNAME="DemoUserInput" Border='outset' BORDERSTYLE ='complex' INNERBORDER ='Yes' CAPTION="Yes" MaximizeButton='No' MinimizeButton='No' Scroll='No' SCROLLFLAT ='No' SingleInstance='Yes' ShowInTaskbar='No' SysMenu='No' /><STYLE Type='text/css'> Body { Font-Size:9.25pt; Font-Weight:Bold; Font-Family:Segoe Ui, Arial,Tahoma,Comic Sans MS; Color:Black; BackGround-Color:Transparent; Filter:progid:DXImageTransform.Microsoft.Gradient (StartColorStr='#ece6e0',EndColorStr='#c0bab4'); Margin-Top:21; Margin-Bottom:1; Margin-Left:4; Margin-Right:4; Padding-Top:1; Padding-Bottom:1; Padding-Left:4; Padding-Right:4; Text-Align:Center; Vertical-Align:Top; Border-Top:0px Transparent; Border-Bottom:0px Transparent; Border-Left:0px Transparent; Border-Right:0px Transparent; } BUTTON { Cursor:Hand; Height:19; Width:69; Font-Size:8.25pt; Font-Weight:Bold; Font-Family:Segoe Ui, Arial,Tahoma,Comic Sans MS; Color:#001141; Text-Align:Center; Vertical-Align:Middle; Filter:progid:DXImageTransform.Microsoft.Gradient (StartColorStr='AliceBlue',endColorStr='LightSlateGray'); Border-Top:0px Transparent; Border-Bottom:0px Transparent; Border-Left:0px Transparent; Border-Right:0px Transparent; Padding-Top:0; Padding-Bottom:2; Padding-Left:0; Padding-Right:0; Margin-Top:1; Margin-Bottom:1; Margin-Left:1; Margin-Right:1; BackGround-Color:Transparent; } TABLE { Font-Size:8.25pt; Font-Weight:Bold; Font-Family:Segoe Ui, Arial,Tahoma,Comic Sans MS; Color:Black; Margin-Top:-1; }</STYLE><script Language='VBScript'>'-> Resize And Move Window To Center Dim Wth :Wth = int(525) Dim Hht :Hht = int(335) window.ResizeTo Wth, Hht MoveTo ((Screen.Width / 2) - (Wth / 2)),((Screen.Height / 2) - (Hht / 2))'-> Function For Submit Button Function UserInput() If TxBox1.value = "" And TxBox2.value = "" And _ TxBox3.value = "" And TxBox4.value = "" And _ TxBox5.value = "" And TxBox6.value = "" And _ TxBox7.value = "" And TxBox8.value = "" Then alert("No Input Was Found In Any Of The Textboxes") Else If Not TxBox1.value = "" Then TxBox1.value = TxBox1.value Else TxBox1.value = "No User Input For Textbox 1" End If If Not TxBox2.value = "" Then TxBox2.value = TxBox2.value Else TxBox2.value = "No User Input For Textbox 2" End If If Not TxBox3.value = "" Then TxBox3.value = TxBox3.value Else TxBox3.value = "No User Input For Textbox 3" End If If Not TxBox4.value = "" Then TxBox4.value = TxBox4.value Else TxBox4.value = "No User Input For Textbox 4" End If If Not TxBox5.value = "" Then TxBox5.value = TxBox5.value Else TxBox5.value = "No User Input For Textbox 5" End If If Not TxBox6.value = "" Then TxBox6.value = TxBox6.value Else TxBox6.value = "No User Input For Textbox 6" End If If Not TxBox7.value = "" Then TxBox7.value = TxBox7.value Else TxBox7.value = "No User Input For Textbox 7" End If If Not TxBox8.value = "" Then TxBox8.value = TxBox8.value Else TxBox8.value = "No User Input For Textbox 8" End If alert( "Result From Textboxes Demo" & vbcrlf & _ "Textbox 1 = " & TxBox1.value & vbcrlf & _ "Textbox 2 = " & TxBox2.value & vbcrlf & _ "Textbox 3 = " & TxBox3.value & vbcrlf & _ "Textbox 4 = " & TxBox4.value & vbcrlf & _ "Textbox 5 = " & TxBox5.value & vbcrlf & _ "Textbox 6 = " & TxBox6.value & vbcrlf & _ "Textbox 7 = " & TxBox7.value & vbcrlf & _ "Textbox 8 = " & TxBox8.value) End If End Function</Script><BODY><!-- Textboxes Container --><TABLE Style='Margin-Top:1;'><TD><!-- Textbox 1 --> <TABLE><TD Width='180'>Type In First Name</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox1'></TD></TABLE><!-- Textbox 2 --> <TABLE><TD Width='180'>Type In Middle Name</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox2'></TD></TABLE><!-- Textbox 3 --> <TABLE><TD Width='180'>Type In Last Name</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox3'></TD></TABLE><!-- Textbox 4 --> <TABLE><TD Width='180'>Type In Your Street Address</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox4'></TD></TABLE><!-- Textbox 5 --> <TABLE><TD Width='180'>Type In The City Name</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox5'></TD></TABLE><!-- Textbox 6 --> <TABLE><TD Width='180'>Type In State Or Province</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox6'></TD></TABLE><!-- Textbox 7 --> <TABLE><TD Width='180'>Type In Country Name</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox7'></TD></TABLE><!-- Textbox 8 --> <TABLE><TD Width='180'>Type In Postal Or Zip Code</TD> <TD><Input Type='text' Size='40' Class='' Name='TxBox8'></TD></TABLE></TD></TABLE><!-- Button Container --> <TABLE Style='Margin-Top:3;'><TD> <BUTTON ID='Btn01' OnClick='UserInput()'>Submit</BUTTON> <BUTTON ID='Btn02' OnClick='window.Close()'>Close</BUTTON> </TD></TABLE></BODY>Demo_UserInput.zip
arlanne2 Posted September 20, 2011 Author Posted September 20, 2011 @gunsmokingman, thanks this is it. how to convert this code into .vbs file?
gunsmokingman Posted September 20, 2011 Posted September 20, 2011 You can not make a VBS script look like a HTA.HTA is what makes up the GUI, the VBS is thescript langauge.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now