I have a script, in it, it calls open it to invokes a HTA that is
really just a form for someone to fill out with some information. I
can get the script to invoke the client HTA, but I find that its
reference to is lost, and therefore resultig in an error. Here is my
script code:
Set objExp = CreateObject("InternetExplorer.Application", "IE_")
objExp.Navigate "file:///c:\temp.sample.hta"
objExp.Toolbar = 0
objExp.Statusbar = 0
objExp.Top = 0
objExp.Visible = 1
Do While (objExp.Document.All.OKClicked.Value = "")
wscript.Sleep 250
Loop
fName = objExp.Document.All.fName.value
etc.
When the script gets to the "Do While" it errors out with error:
"(null): The object invoked has disconnected from its clients." Is
there anyway that I can invoke an HTA through possibly a different COM
object that would let me later retreive HTML value from the HTA open,
like you could with an HTML document....I think an alternative is to
have the HTA write the values to a text file when OK clicked, and then
have the script sleep until the text file exists, once exists open text
file and readLine() its values, but I was just wondering if their was a
better way. Thanks