Comate Plus GetStringProperty and MSScript

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Comate Plus GetStringProperty and MSScript

Post 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 :
ARGENTINA WORLD CHAMPION
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Comate Plus GetStringProperty and MSScript

Post 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.
I may look like a mule, but I'm not a complete ass.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Comate Plus GetStringProperty and MSScript

Post 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.
ARGENTINA WORLD CHAMPION
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Comate Plus GetStringProperty and MSScript

Post 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.
ARGENTINA WORLD CHAMPION
Post Reply