Prev: Scripts in console - color coding output
Next: WMI
From: McKirahan on 27 Jun 2006 09:09 "Lando" <lando(a)noemails.com> wrote in message news:ugk81eemGHA.1576(a)TK2MSFTNGP05.phx.gbl... > Thank you very much for the sample code but my current vbs script is over > 1500 lines long and converting it to HTA would take some time. I may look at > converting it later but there are some limitations in HTA such as no > wscript.sleep, etc that would have an impact on my script. Does anyne know > if my inital question is possible? Having a vbs file write to a iframe in a > running HTA. Thanks again for everyones help. You guys are always such a > good resource. > > Lando It should not take much time at all to convert it; it all goes under <script>. Post it and I'll show you. As far as WScript.Sleep goes -- there are workarounds; try Google Groups.
From: brianjester@gmail.com on 27 Jun 2006 20:54
Lando, I did something similar when I wrote an HTA browser. Here's the link (IE only): http://www.brianjester.us/src/test.hta And here's the code: <HTML> <HEAD> <TITLE>HTA Browser Example - Brian Jester</TITLE> <HTA:APPLICATION ID="oHTA" APPLICATIONAME="KillerApp" BORDER="thick" BORDERSTYLE="static" CAPTION="yes" CONTEXTMENU="yes" ICON="C:\www\favicon.ico" VERSION="1.4" MAXIMIZEBUTTON="yes" MINIMIZEBUTTON="yes" SCROLL="auto" /> <STYLE> BODY {font-size: 8pt; font-family: Arial;} </STYLE> </HEAD> <script language="vbscript"> Dim strURL Function setURL() strURL = textbox.value window.frames(0).location.href = strURL End Function </SCRIPT> <BODY SCROLL="yes"> <INPUT TYPE="text" VALUE="http://" NAME="textbox" SIZE=97> <INPUT TYPE="button" VALUE="Go" name="go_button" onClick="setURL"> <BR> <IFRAME NAME="myFrame" WIDTH=640 HEIGHT=310> If you can see this, your browser doesn't understand IFRAME. </IFRAME> </BODY> </HTML> Lando wrote: > Is is possible to write a vbs script to write to an iframe in an external > HTA file that is running? I have a vbscript runs at login for mapping > drives, etc. The script opens an html dialog to display the login results as > they are processed. I would like to convert the html dialog to an hta > application so I don't need to host the login html on one of our web servers > and just have the script open the hta file from the same location the script > runs. Any sample code would be GREATLY appreciated! > > Thanks! |