Page 1 of 1 1
Topic Options
#77483 - 2001-04-04 02:43 PM FYI - IE5: Errors retrieving all OLE get/set properties
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ruud:

This is just an FYI...

It would seem that KiXtart OLE has difficulty with retrieving get/set properties under Internet Explorer (5.5).

The following 3.63 script navigates to microsoft and displays a get-only property (nameprop) and a get/set property (title). KiXtart thinks that the get title is actually a method call and reports that it's missing ()'s ...

[KiX 3.63]

code:

break on


$ie = olecreateobject("internetexplorer.application")


if $ie


$= olecallfunc ($ie,"navigate","s","http://www.microsoft.com")


while olegetproperty($ie,"busy") <> "0" and @error = 0 loop
while olegetproperty($ie,"readystate") <> "4" and @error = 0 loop

$document = val("&"+olegetproperty($ie,"document"))


if $document


?"name=" olegetproperty($document,"nameprop")

?"title=" olegetproperty($document,"title")


endif


endif


exit


[KiX 2001 (kix32.exe)]

code:

break on


$ie = createobject("internetexplorer.application")


if $ie


$= $ie.navigate("http://www.microsoft.com")


while $ie.busy and @error = 0 loop
while $ie.readystate <> 4 and @error = 0 loop


$document = $ie.document


if $document


?"Name=" $document.nameprop


; The following get property does not work ...


?"Title=" $document.title


endif


endif


?"pause..." gets $k


exit


KiX2001 reports the following error:

Script error : invalid method/function call: missing '(' ! endif

Shawn.

[This message has been edited by Shawn (edited 04 April 2001).]

Top
#77484 - 2001-04-05 09:53 AM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Heya Shawn,

I tried your script, and I get the same error. But when I do the following it spins like a charm:

code:

$ie = createobject("internetexplorer.application")


if $ie


$= $ie.navigate("http://www.microsoft.com")


while $ie.busy and @error = 0 loop
while $ie.readystate <> 4 and @error = 0 loop


$document = $ie.document


if $document


?"Name=" $document.nameprop ()


; The following get property does not work ...


?"Title=" $document.title ()


endif


endif


?"pause..." gets $k


exit


Could that be the solution? Please note that with both of the "get property" commands I pass () to illustrate that I dont pass any variables...

Please try it

------------------
Cheers....

David

Top
#77485 - 2001-04-06 12:22 AM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


I have been working a bit on your script, and a funny thing a have discovered is that when I do the following Kix crashes with an illegal operation error:

code:

$ie = createobject("internetexplorer.application")


if $ie

$RC = $ie.navigate("http://www.microsoft.com")
$RC = $ie.visible = ("1")
while $ie.busy and @error = 0 loop
while $ie.readystate <> 4 and @error = 0 loop

$document = $ie.document

if $document

$RC = $document.open ()
? $RC
; The following line makes kix crash
$RC = $document.write (<h4>Test</h4> )
? $RC

?"Name=" $document.nameprop ()


; The following get property does not work ...


?"Title=" $document.title ()


endif


endif


?"pause..." gets $k


exit


Another very strange thing is that the script does not open an Internet Explorer window??? I thought that was the point?

------------------
Cheers....

David

Top
#77486 - 2001-04-05 04:46 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
David:

Good call. I tried it with the ()'s and it made the syntax error go away. But it would seem that it still doesn't fetch the title of the document. The output from this script should be this...

name=Welcome to Microsoft's Homepage
title=Welcome to Microsoft's Homepage

Any other ideas ?

Shawn.

ps

I purposely didn't turn visibility on, one can do so like this...

...
$= $ie.navigate("http://www.microsoft.com")

$ie.visible = 1

while $ie.busy and @error = 0 loop
while $ie.readystate <> 4 and @error = 0 loop
...


Top
#77487 - 2001-04-05 07:48 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
David,

I tried your script and still get:

Name=Welcome to Microsoft's Homepage
Title=

What version of ie do you have? I am using 5.50.4134.0600IC

cj

Top
#77488 - 2001-04-06 09:13 AM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Hey,

when i run the script, I get:
Name=W
Title=

And when I set the script to navigate to www.av.com I get:
Name=A
Title=

?!?

But the most weird thing, I ran the script but it didn't open up an Internet Explorer window. Then I rem out the entire $document routine, and then it works. Then I unrem it, and it still works??? What can we conclude of this? KiX is a VERY living language, it got personality, sometimes it is in a good mood sometimes it is not

CJ:

I use IE v. 5.50.4522.1800IC

------------------
Cheers....

David

Top
#77489 - 2001-04-09 04:20 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Hey Shawn,

any progress on the IE ole/com project? I have been testing a lot, but I havent made it work...yet

What about your DB script, have you looked at it in kix2001?

------------------
Cheers....

David

Top
#77490 - 2001-04-09 06:26 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
No, I've put my OLE testing on hold for now. Like yourself, I'm just running into too many issues with it in this release...

And to be fair (due to the fact that Ruud hasn't (fully) finished COM support yet) it really doesn't make sense to try and second-guess how things "should" work or to invest a whole lot of time developing work-arounds, etc. I'm going to wait for the next beta release or whenever it is that Ruud says it's OK to start testing OLE...

As well, I do have some concerns and questions that can only be answered with the full-blown release and documentation, example...

1) Is KiXtart peeking at COM typelibs ? I find it hard to believe that it would (this goes back to your original problem) and I figure the error your getting about missing parameters has to do with some other issue. In my humble opinion, scripting languages should never do runtime checking of method calls and should only "pass-along" whatever it is that that's coded between the ()'s. Parameter conversion and validation should be handled by the Automation Server itself (IMHO).

2) How will KiXtart 2001 object cleanup (garbage collection) be performed? In the current release, it would seem that none is being performed and there is no releaseobject() function (yet). Object cleanup is an often overlooked, but vital aspect of OLE. Especially when your dealing with out-of-proc servers like office that can be left "hanging" if not properly cleaned up.

Anyway, having said all that, I'm still going to continue to play with it though

I'm *very* impressed with what's been done to date. Especially the way in which Ruud has seamlessly integrated OLE into the KiXtart language itself. No small feat to be sure and well done...

Does anyone else have any comments about the *new* OLE ?

Shawn.

Top
#77491 - 2001-04-11 10:58 AM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Well Shawn,

I gotta give it to you, you are right Maybe it is too early to get all buzzed up over issues with OLE/COM when it isn't even done yet. But we have all been waiting a long time for the new generation Kix (Ruud, this is not to put preassure on you ) and I think everybody is very existed with the new version. Thats properbly why we all are making a big mess over something that is not done yet. But we gotta face it, we are like little children on christmas night

The conclusion, expect the unexpected and dont get too hyped when your OLE/COM scripts are not running smoothly.

Anybody disagree?

------------------
Cheers....

David

[This message has been edited by Hallas (edited 11 April 2001).]

Top
#77492 - 2001-04-25 10:13 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Shawn, you invited replys and I can't resist. Com is awesome!

You know from my posts that I really struggled with OLE but now I'm gettin the hang of it. I was discouraged when it was announced that Com would replace OLE but after going over the posts dealing with COM I'm relieved. Com is so easy to use. Opening an object and then dealing with the properties and methods directly with nothing more than the dot operator is intuitive and extremely(My best church lady voice) convieeeeenient. It's almost exactly like dealing with objects in VB

I've read of many bugs in the posts though, and hope Ruud is working on completing this excellent addition to Kix. Either way who can rightly complain...the price is right and it's an outstanding program.

Kirm

P.S. I've got two days left here at the county and hope this is close to my 15th post. I want to achieve the coveted member status(ha ha) before I leave here. 15 posts and you become a regular member right?

Top
#77493 - 2001-04-25 10:15 PM Re: FYI - IE5: Errors retrieving all OLE get/set properties
Anonymous
Unregistered


Alright! I'm a member. When do I get my free Kix T-shirt?
Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 593 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.057 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.