|
|
|||||||
I have tried to convert Bryces OLE code for sending HTML to IE to COM in K2k and have a little problem: code: I have tried every combination of $ie.document and .write that I can think of. These cause Dr Watson: $doc.write()="$html" I have also tried $ie.document.write to no avail help?
Here is the original OLE source code: cj |
||||||||
|
|
|||||||
Shawn is the OLE guru around these parts (he taught me how to do that code)... but I think the general consensus on Kix2001 and OLE/COM, is wait-n-see. Some things aren't fully working yet. :P Bryce ------------------ |
||||||||
|
|
|||||||
I got it working, but now another problem. I know it is not fully working yet, but I want to see what I CAN do. I can write to a text box in IE with $doc=$ie.document But I can't read the value back. $element.value errors and $element.value() erases the value. .innerHTML() also erases the value. Any ideas? cj |
||||||||
|
|
|||||||
ceej: Let's see your working code ! Shawn. |
||||||||
|
|
|||||||
A simple text box. The default value is set by the HTML source. I would like to read the VALUE, but you will see that the $e.value() writes to it instead. I have tried CheckBoxes too, and the Checked parameter writes. I am looking for the reading command. code: cj |
||||||||
|
|
|||||||
CJ have you worked on this any more? ------------------ |
||||||||
|
|
|||||||
This was the HTML TicTacToe code. With this and a little more hair loss I discovered that you cannot WRITE to anything on a web page in IE with KiX2k COM calls. But, KiX3.6x WRITES just fine, so HTML TTT is .KIX, not .K2K Ruud, is this the case?
------------------ |
||||||||
|
|
|||||||
Error using the write command... I was trying the same thing, and that was why I was asking. I have tried $doc.write("$html") $doc.write = "$html"
code: Bryce ------------------ |
||||||||
|
|
|||||||
Yes, I found the same thing. It is due to the 'you can't send info to the COM object' problem. You can all functions, but you can't actually send VALUEs :frustrated: :aaarrrggghhh!: cj |
||||||||
|
|
|||||||
I'm sure if anyone has posted an update to this, but this should work!!! $ie=createobject("internetexplorer.application") $ie.navigate("about:blank") while $ie.busy<>0 and @error=0 loop $doc=$ie.document $= $doc.write("<h4>Setting environment variables ...</h4>") sleep (3) |
||||||||
|
|
|||||||
Works on KiXtart 2001 RC3 for me. Did not bring app to the foreground though. |
||||||||
|
|
|||||||
all of these com bugs were fixed with RC1 and greater.... I have used COM and IE interface read/write in this UDF here. GUIPassPrompt Bryce |
||||||||
|
|
|||||||
I had forgotten this post :s I have since solved this problem and even released a KiX2k version of TicTacToe (I can't find it, but it's on this board somewhere) cj |
||||||||
|
|
|||||||
Here it is: New, faster TicTacToe game (RC1 only) cj |
||||||||
|
|
|||||||
Hey Guys, Re: IE Automation... Check this out. Built for KiXtart 2001 and based on all of the previous posts regarding COM automation and IE. Enjoy!
;HTML Input Box:
IF $L_Title = "" SELECT SELECT
IF $L_AltButtonText <> "" ;Make IE visible and set focus DIM $L_LastBoxValue,$L_LastBoxValueCache |
||||||||
|
|
|||||||
Hey Steve ... VERY CLEVER !!! Works like a champ and is a heck of alot prettier / more sohisicated than that built-in VBScript/JScript inputbox ... -Shawn |
||||||||
|
|
|||||||
Thanks. I thought that this needed to be written since there's no inputbox() in KiX by default. Ruud was pulling his hairs out for a while since the IE object does some funny things and I kept bugging him when something didn't work right. We must have run into and fixed about 4 separate GPF's in the course of developing this UDF. But I think it was worth it. ;-) -Steve O |