Advertisement
alfps

Untitled

Feb 20th, 2012
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.95 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2.   "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4.     <head>
  5.         <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
  6.         <meta http-equiv="MSThemeCompatible" content="Yes"> <!-- For HTA -->
  7.  
  8.         <title>Blah blah</title>
  9.  
  10.         <style>
  11.             *
  12.             {
  13.                 font-family: "Tahoma";
  14.                 font-size: 9pt;
  15.             }
  16.  
  17.             .resultdisplay
  18.             {
  19.                 font-family: "Lucida Console";
  20.                 color: white; background: black;
  21.                 position: fixed;
  22.                 left: 0; top: 5em; right: -0;  bottom: -0;
  23.                 white-space: nowrap;
  24.                 overflow: scroll;
  25.             }
  26.         </style>
  27.         <script type="text/javascript">
  28.             function createCOMObject( progId )
  29.             {
  30.                 return new ActiveXObject( progId );
  31.             }
  32.            
  33.             var wshShell    = createCOMObject( "WScript.Shell" )
  34.  
  35.             function updateResult()
  36.             {
  37.                 //alert( wshShell.CurrentDirectory );
  38.                 var process = wshShell.Exec( "uh.console_app.exe" );    // TODO: name.
  39.                 var input   = username.value;
  40.                 process.StdIn.Write( input + "\r\n" );
  41.  
  42.                 var output = process.StdOut.ReadAll();
  43.                 resultDisplay.innerText = output;   // TODO: Remove prompt text, etc.
  44.             }
  45.         </script>
  46.  
  47.     </head>
  48.    
  49.     <body>
  50.         <div id="wrapper">
  51.             <div>
  52.                 <label for="username">Your name?</label>
  53.                 <input id="username" type="text" width="40em"/>
  54.                 &nbsp;
  55.                 <button onclick="updateResult()">Update results</button>
  56.             </div>
  57.             <div id="resultDisplay" class="resultdisplay" style="">
  58.                 Blah blah
  59.             </div>
  60.         </div>
  61.     </body>
  62. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement