I'm trying to build an hta that will accept a number (for the number of tabs) and a URL (opens in all the tabs). These 2 values are to be input by the user. My work in progress below is NOT functioning. :-(
Can someone help?
[!]The AutoSavers![/!]
Can someone help?
Code:
<head>
<title>test app</title>
<HTA:APPLICATION
APPLICATIONNAME="test app"
SCROLL="no"
SINGLEINSTANCE="no"
WINDOWSTATE="normal"
VERSION="1.0"
/>
<style type="text/css">
body {
font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
background-color:#CCCCCC;
filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#6699FF',EndColorStr='#FFFFFF');
p {font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif}
p {color: black}
p {font-size: 100%}
p.body {
padding: 4px;
margin: 4px;
}
h1 {font-size: 130%}
h1 {color: #000099}
table.tools {
border:2px solid;
width: 98%;
border-top-color: #E6E6E6;
border-bottom-color: #000099;
border-right-color: #000099;
border-left-color: #CCCCCC;
font: 14px Verdana, Arial, Helvetica, sans-serif
}
td {
color: #000099;
font: 14px Verdana, Geneva, Arial, Helvetica, sans-serif;
border-color: #000099;
}
td {vertical-align:middle}
td.button {
width: 212px;
padding: 0px;
background-color: ##6699FF;
}
td.every {
background-color: white;
padding-left: 6px;
}
td.other {
background-color: #E5ECFF;
padding-left: 6px;
}
input.button {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight:bold;
font-size: 14px;
background-color: #000099;
color: white;
width:211px;
height: 40px;
}
}
.style2 {
border-style: solid;
border-width: 1px;
}
}
.style2b {
border-style: solid;
border-width: 1px;
background-color: #000099;
color: white;
padding-left: 6px;
}
</style>
</head>
<script language="VBScript">
Sub Window_onLoad
window.resizeTo 400,400
End Sub
</SCRIPT>
<body>
<div>
<table class="tools" cellspacing="0">
<tr>
<td class="button">
<form action="" onSubmit="ServiceChecker_Onclick()" method="get" target="_blank" >
number of tabs: <input type="text" name="strNUM" value="" ><br >
tab URL: <input type="text" name="strURL" value="" ><br >
<input type="submit" value="Submit" >
</form>
<script language="VBScript">
Sub ServiceChecker_Onclick
Dim strNum
Dim WshShell
msgbox "hello"
Set WshShell = CreateObject("WScript.Shell")
set i = strNum
Do Until i=0
i=i-1
WshShell.Run ("chrome.exe" & Space(1) & strURL)
If i<1 Then Exit Do
Loop
End Sub
</script>
</td>
<td class="other"></td>
</tr>
</table>
</div>
<br>
<br>
</body>
[!]The AutoSavers![/!]