Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automate IE Popup
Message
From
12/10/2005 17:45:18
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
 
 
To
12/10/2005 14:59:23
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01058408
Message ID:
01058480
Views:
23
I was able to get this working by binding to the NewWindow2 event in the DWebBrowserEvents2 interface. In the Event Handler class, the code looks something like this:
	PROCEDURE DWebBrowserEvents2_NewWindow2(ppDisp AS VARIANT @, Cancel AS LOGICAL @) AS VOID;
 				HELPSTRING "A new, hidden, non-navigated WebBrowser window is needed."
		ppDisp = CreateObject("InternetExplorer.Application")  && reference to new browser
		This.oNewBrowser = ppDisp && custom property
	ENDPROC
Since you have to implement the entire DWebBrowserEvents2 interface, you also have to trap for the FileDownload type library bug: http://www.west-wind.com/wwthreads/Message17N0YECXT.wwt

>I'm trying to use IE automation to login and transmit data to a web site (a Web Service is currently not available). My problem is that the initial page opens a popup window for logging in, but I can't get a reference to the popup. It doesn't show up in the IE.Document.Forms collection. Does anyone know how to do this? Once I have the reference, I think I can proceed. Here's what my code looks like:
>
>oIE = CreateObject("InternetExplorer.Application")
>oIE.Visible = .t.
>oIE.Navigate("https://goldleafach.com/achbeta/?8435017")
>? oIE.Document.Forms.Length  && returns 1 (initial form only)
>? oIE.Document.Forms(0).Name && returns name of initial form
>? oIE.Document.Forms(1).Name && fails
>
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Previous
Reply
Map
View

Click here to load this message in the networking platform