Page 2 of 2

Re: Comate Plus GetStringProperty and MSScript

Posted: Thu Feb 13, 2014 12:08 am
by ricardo
Its possible to run Wscript?

Per example, run this code its not possible:

Code: Select all

Set objIE = WScript.CreateObject("InternetExplorer.Application","objIE_")
objIE.Visible = True
objIE.navigate "http://www.google.com" 
boolBrowserRunning = True 
 
Do While objIE.Visible
    WScript.Sleep 500
Loop

Sub objIE_NavigateComplete2(ByVal pDisp, URL)
    WScript.Echo "You just navigated to", URL
End Sub 

Sub objIE_OnQuit()
    boolBrowserRunning = False
End Sub
Because, without Wscript, cant attach events, or at least i dont know how to do them.

Thanks in advance for any help :

Re: Comate Plus GetStringProperty and MSScript

Posted: Thu Feb 13, 2014 11:25 am
by srod
What are you trying to do exactly? You want to run the MS script control and the Windows script host? Yikes!

COMate will allow you to work with the InternetExplorer.Application object so I don't understand why you would want to call on the script host? You can trap events with COMate.

Re: Comate Plus GetStringProperty and MSScript

Posted: Thu Feb 13, 2014 9:02 pm
by ricardo
srod wrote:What are you trying to do exactly? You want to run the MS script control and the Windows script host? Yikes!

COMate will allow you to work with the InternetExplorer.Application object so I don't understand why you would want to call on the script host? You can trap events with COMate.
I can trap the NavigateComplete? This is the one im trying to get.

I want to create an instance of IE, make it navigate and get the Navigate Complete basically.

Re: Comate Plus GetStringProperty and MSScript

Posted: Thu Feb 13, 2014 9:08 pm
by ricardo
This one?

Code: Select all

browser\SetEventHandler(#COMate_CatchAllEvents, @BrowserEventProc(), 0, iid)
Ok, i found a workaround using PB, not using the lst code because maybe im dealing with a popup, i mean, by a IE does not created by me, so i cant depend on this.
For now im managin event via VBS and sending to PB via the code you showed me to callback.