#51313 - 2000-09-12 08:33 PM
Re: OLE and Internet Explorer
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
I have unshelved a win9x computer and hooked it back up and am currently looking into it too, this is what I have so far.the command code:
? olegetproperty($ie, "document")
is returning this. ?d and code:
? ("&" + olegetproperty($ie, "document"))
is returning this &???D?D> ( and '>' = asc(16) ) Am I correct in guessing that this should be a hex number? Bryce COOL! we got this thread to go 2 pages 
[This message has been edited by Bryce (edited 12 September 2000).]
|
|
Top
|
|
|
|
#51316 - 2000-09-13 04:14 PM
Re: OLE and Internet Explorer
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Didn't get a chance to test last night.Drat. But was wundrin if it has something to do with COM/OLE and 16/32 bit support. Me thinks it does. The problem would seem to be something to do with the way KiX fetches or OLE delivers, virtual addresses through the IDispatch (Automation) interface ... Could you run the following script on Win95. code:
break on $ie = olecreateobject("internetexplorer.application") ?"create: ie=$ie error=@error @serror"
$rs = olecallfunc($ie, "navigate", "s", "about:blank") ?"navigate: rs=$rs error=@error @serror"
$rs = oleputproperty($ie, "visible", "s", "-1") ?"visible: rs=$rs error=@error @serror"
?"hit any key to continue..." get $k ; the Radimus Special 'K'
while olegetproperty($ie, "busy") <> "0" and @error = 0 loop ?"loopbusy: error=@error @serror"
$doc = olegetproperty($ie, "document") ?"document: doc=$doc error=@error @serror"
$rs = olecallfunc ( $ie, "quit" ) $rs = olereleaseobject ( $ie )
exit
If this doesn't work - we can aslo look at writting the same script in VBScript to see if the same thing occurrs (eliminate KiX as the problem)... Shawn.
|
|
Top
|
|
|
|
#51317 - 2000-09-13 04:46 PM
Re: OLE and Internet Explorer
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
ok i ran it and i got the following. quote:
Win2k U:\temp>kix32 test2 create: ie=1331388 error=0 The operation completed successfully. navigate: rs= error=0 The operation completed successfully. visible: rs=0 error=0 The operation completed successfully. hit any key to continue... loopbusy: error=0 The operation completed successfully. document: doc=1456a4 error=0 The operation completed successfully. Win95 U:\temp>kix32 test2
create: ie=4466612 error=0 The operation completed successfully. navigate: rs= error=0 The operation completed successfully. visible: rs=0 error=0 The operation completed successfully. hit any key to continue... loopbusy: error=0 The operation completed successfully. document: doc=?V error=0 The operation completed successfully.
I also came up with a similar biy of code yesterday
code:
$false = 0 $true = -1$ie = olecreateobject("internetexplorer.application") ? "$Ie <--- this is the handle for the IE exe that was just opened." ; Set properties and display form ... $nul = oleputproperty($ie, "addressbar","s","$false") $nul = oleputproperty($ie, "menubar", "s", "$false") $nul = oleputproperty($ie, "toolbar", "s", "$false") $nul = oleputproperty($ie, "statusbar", "s", "$false") $nul = oleputproperty($ie, "resizable", "s", "$false") $nul = oleputproperty($ie, "top", "s", "100") $nul = oleputproperty($ie, "left", "s", "200") $nul = oleputproperty($ie, "height", "s", "165") $nul = oleputproperty($ie, "width", "s", "275") $nul = oleputproperty($ie, "visible", "s", "$true") $nul = olecallfunc($ie, "navigate", "s", "about:blank") while olegetproperty($ie, "busy") <> "0" and @error = 0 loop ; Get a handle to the open document ... ; $doc = val("&" + olegetproperty($ie, "document")) ? olegetproperty($ie, "document") + " <--- this is the handle for the IE Document should be a hex#" ? @serror
Bryce
|
|
Top
|
|
|
|
#51318 - 2000-09-13 07:25 PM
Re: OLE and Internet Explorer
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Bryce...Can you try this on Win95 ... c:\> wscript test.vbs or cscript.exe will work too ! code:
dim ie, doc set ie = createobject ("internetexplorer.application")
ie.navigate ( "about:blank" ) ie.visible = 1
set doc = ie.document
doc.write ( "<html><body><h1>Hello Bryce!</h1></body></html>" )
msgbox ("Pausing...")
ie.quit()
set doc = nothing
set ie = nothing
Shawn p.s. I didn't code-up the wait for busy loop - hope it doesn't interfere ! Shawn.. p.p.s. I'm hoping that this is a taste of what KiXtart2000 will be like ?  Shawn... [This message has been edited by Shawn (edited 13 September 2000).]
|
|
Top
|
|
|
|
#51322 - 2000-09-13 11:31 PM
Re: OLE and Internet Explorer
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Bryce:Ok - first try this script... Give IE lots of time to "loadup" before continuing on the first pause. I would expect the same error. code:
dim ie, doc set ie = createobject ("internetexplorer.application")
ie.navigate ( "about:blank" ) ie.visible = 1
msgbox ("Pausing...")
set doc = ie.document
doc.write ( "<html><body><h1>Hello Bryce!</h1></body><html>" )
msgbox ("Pausing...")
ie.quit()
set doc = nothing
set ie = nothing
Then try this code... code:
dim ie set ie = createobject ("internetexplorer.application")
ie.navigate ( "about:blank" ) ie.visible = 1
msgbox ("Pausing...")
ie.document.write ( "<html><body><h1>Hello Bryce!</h1></body><html>" )
msgbox ("Pausing...")
ie.quit()
set doc = nothing
set ie = nothing
This bypasses the olegetproperty() type function and accesses the document object directly ! Shawn.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 696 anonymous users online.
|
|
|