Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Input Box 1

Status
Not open for further replies.

minoad

Programmer
Mar 28, 2001
138
US
The script i have created opens up severa webpages and an instance of notepad for a call center. this is the code.
I need to create a password input box that does not display the pass in plain text. Any ideas would be appreciated.

Forgive the horendous formating below
---------------------------------------------
set WshShell = CreateObject("WScript.Shell")
dim i
dim user
dim pass

user = InputBox("Enter your user name")
pass = InputBox("Enter your password")

Wshshell.run "Notepad"

WshShell.Run "iexplore user & ":"& pass &"@bellsouth.calltech.com/board/current_issues/index.html"

WshShell.Run "iexplore user & ":"& pass &"@bellsouth.calltech.com/techhelp/techhelp2000/"

WshShell.Run "iexplore user & ":"& pass &"@bellsouth.calltech.com/techhelp/techhelp2000/tools/tools_index.html"

WshShell.Run "iexplore user & ":"& pass &"@bellsouth.calltech.com/techhelp/techhelp2000/tools/supercalltracking/supercalltracking.html"
---------------------------------------------------

Thanks,

Micah A. Norman
 
WSH is very limiting as far as user interfaces go, unless you are prepared to do a LOT of work. Instead, try something like this...

(1.) Start Notepad.

(2.) Copy/paste this text into Notepad:
Code:
<HTML>
<HTA:APPLICATION APPLICATIONNAME=&quot;Example&quot;
    CONTEXTMENU=no SCROLL=no MAXIMIZEBUTTON=no />
<HEAD>
<TITLE>Example</TITLE>
<SCRIPT language=vbscript>
Sub cmdContinue_onclick()
    Dim WshShell
    Dim user
    Dim pass
    Dim ieuserpass, techhelp2000

    Set WshShell = CreateObject(&quot;WScript.Shell&quot;)
    ieuserpass = &quot;iexplore [URL unfurl="true"]http://&quot;[/URL] & user & &quot;:&quot; & pass
    techhelp2000 = &quot;@bellsouth.calltech.com/techhelp/techhelp2000/&quot;
    Wshshell.Run &quot;Notepad&quot;
    WshShell.Run ieuserpass & _
                 &quot;@bellsouth.calltech.com/board/current_issues/index.html&quot;
    WshShell.Run ieuserpass & techhelp2000
    WshShell.Run ieuserpass & techhelp2000 & _
                 &quot;/tools/tools_index.html&quot;
    WshShell.Run ieuserpass & techhelp2000 & _
                 &quot;/tools/supercalltracking/supercalltracking.html&quot;
    window.close
End Sub

Sub window_onload()
    window.resizeTo 300, 200
End Sub
</SCRIPT>
</HEAD>
<BODY>
    <H1>Example</H1>
    <TABLE border=0>
        <TR>
            <TD>User:</TD>
            <TD><INPUT id=user name=user size=20></TD>
        </TR>
        <TR>
            <TD>Password:</TD>
            <TD><INPUT id=pass name=pass type=password size=20></TD>
        </TR>
        <TR>
            <TD>&nbsp;</TD>
            <TD><INPUT id=cmdContinue name=cmdContinue
                 type=button value=&quot;Continue&quot;> 
            </TD>
        </TR>
    </TABLE>
</BODY>
</HTML>
(3.) Save the files as Example.hta, taking special note of the file extension HTA.

(4.) Double-click on the Example.hta's icon.

Enjoy, jazz it up with a little color, a logo, etc.
 
dilettante's .hta file needs slight modification before it will run as intended on some machines. Ive added a few extra lines to ensure that the valuse entered in the html form are accessible to the vbscript in Sub cmdContinue_onclick().

<HTML>
<HTA:APPLICATION APPLICATIONNAME=&quot;Example&quot;
CONTEXTMENU=no SCROLL=no MAXIMIZEBUTTON=no />
<HEAD>
<TITLE>Example</TITLE>
<SCRIPT language=vbscript>
Sub cmdContinue_onclick()
Dim WshShell
Dim user
Dim pass
Dim ieuserpass, techhelp2000
user = document.Example.user.value
pass = document.Example.pass.value
Set WshShell = CreateObject(&quot;WScript.Shell&quot;)
MsgBox &quot;username:&quot; & user & vbcrlf & &quot;password:&quot; & pass
ieuserpass = &quot;iexplore & user & &quot;:&quot; & pass
techhelp2000 = &quot;@bellsouth.calltech.com/techhelp/techhelp2000/&quot;
Wshshell.Run &quot;Notepad&quot;
WshShell.Run ieuserpass & _
&quot;@bellsouth.calltech.com/board/current_issues/index.html&quot;
WshShell.Run ieuserpass & techhelp2000
WshShell.Run ieuserpass & techhelp2000 & _
&quot;/tools/tools_index.html&quot;
WshShell.Run ieuserpass & techhelp2000 & _
&quot;/tools/supercalltracking/supercalltracking.html&quot;
window.close
End Sub

Sub window_onload()
window.resizeTo 300, 200
End Sub
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME=&quot;Example&quot;>
<H1>Example</H1>
<TABLE border=0>
<TR>
<TD>User:</TD>
<TD><INPUT id=user name=user size=20></TD>
</TR>
<TR>
<TD>Password:</TD>
<TD><INPUT id=pass name=pass type=password size=20></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT id=cmdContinue name=cmdContinue
type=button value=&quot;Continue&quot;>
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top