Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Blah blah</title>
- <style>
- *
- {
- font-size: 9pt;
- }
- .resultdisplay
- {
- font-family: "Lucida Console";
- color: white; background: black;
- }
- </style>
- <script type="text/javascript">
- function createCOMObject( progId )
- {
- return new ActiveXObject( progId );
- }
- function sleep( milliSecs )
- {
- // TODO:
- }
- var wshShell = createCOMObject( "WScript.Shell" )
- function updateResult()
- {
- //alert( wshShell.CurrentDirectory );
- var process = wshShell.Exec( "uh.console_app.exe" ); // TODO: name.
- var input = username.value;
- process.StdIn.Write( input + "\r\n" );
- var output = "";
- while( !process.StdOut.AtEndOfStream )
- {
- output += process.StdOut.Read( 1 );
- sleep(100);
- }
- resultDisplay.innerText = output; // TODO: Remove prompt text, etc.
- }
- </script>
- </head>
- <body>
- <div>
- <label for="username">Your name?</label>
- <input id="username" type="text" width="40em"/>
- <button onclick="updateResult()">Update results</button>
- </div>
- <hr/>
- <div id="resultDisplay" class="resultdisplay" style="">
- Blah blah
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement