mIRC Home    About    Download    Register    News    Help

Print Thread
#23304 09/05/03 12:45 AM
Joined: Feb 2003
Posts: 309
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
Ahem, make this work if you can:
Below we have some VBscript which works fine under WSH:

set ie=createobject("InternetExplorer.Application")
ie.height = 175
ie.width = 300
ie.menubar = false
ie.toolbar = false
ie.statusbar = false
ie.resizable = false
ie.navigate "about:blank"
'Loop until IE is finished displaying the HTML
Do while ie.busy: x=x+1: loop
ie.document.body.innerHTML = "<html><body>BARK!</body></html">
ie.visible = true

Here's the mIRC port, as far as I can get:

alias ie {
comopen ie InternetExplorer.Application

set %ie ie
echo -s Opens InternetExplorer.Application for 180 seconds
echo -s set height: $com(%ie,height,4,int,175)
echo -s set width: $com(%ie,width,4,int,300)
echo -s set menubar: $com(%ie,menubar,4,bool,false)
echo -s set toolbar: $com(%ie,toolbar,4,bool,false)
echo -s set statusbar: $com(%ie,statusbar,4,bool,false)
echo -s set resizeable: $com(%ie,resizeable,4,bool,false)

;echo -s navigate: $com(%ie,navigate,1,bstr,about:blank)
echo -s navigate: $com(%ie,navigate,1,bstr,http://127.0.0.1/)
;This is what I have trouble with:
;echo -s set document.body.innerHTML: $com(%ie,document.body.innerHTML,5,bstr,test)

timer 1 10 echo -s set visible: $com(%ie,visible,4,bool,true)
timer 1 20 echo -s quit: $+($,com(%ie,quit,1))
timer 1 20 comclose %ie

}
How do we access properties/methods of nested objects, such as InternetExplorer.Application.document.body.innerHTML.

#23305 09/05/03 11:29 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
It's apparently impossible to do with the current version of mirc, because if involves creation of a new object(s), and mirc can't handle that.

You can, however, take a look at the "Dispatch and Unknown" topic of the com help file. Maybe you'll find something.

#23306 12/05/03 11:09 PM
Joined: Feb 2003
Posts: 309
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
aww nuts... i wonder if i should write some WSC/COM objects to handle creating, accessing, etc new objects... using COM to use COM... hrmm...


Link Copied to Clipboard