Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IE automation
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00778814
Message ID:
00778878
Views:
20
Alternatively to what others already suggested you may try this:

#DEFINE READYSTATE_COMPLETE 4
DECLARE INTEGER FindWindow ;
IN WIN32API ;
STRING cNULL, ;
STRING cWinName

DECLARE INTEGER FindWindow IN WIN32API ;
STRING lpclassname, STRING lpCaption
Declare Long SetActiveWindow in WIN32API Long hwnd

oShell = CreateObject("WScript.Shell")

oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate("http://www.microsoft.com")
oie.Visible=.t.
do while oIE.Readystate <> READYSTATE_COMPLETE
wait wind time 1.0 "Connecting to web site...."
enddo


if oShell.AppActivate(oIE.Document.title)
oShell.SendKeys("%Vc")
WAIT WINDOW TIMEOUT 2.0 ""
lhWnd = FindWindow("Notepad", 0)
if lhWnd#0 AND SetActiveWindow(lhWnd)=0
oShell.SendKeys("^+{END}^C")
lchtml=_cliptext
WAIT WINDOW TIMEOUT 2.0 ""
oShell.SendKeys("%Fx")
endif
else
* what ever
ENDIF

?lchtml
ERASE c:\txt.txt
=STRTOFILE(_cliptext,"c:\txt.txt")

oIE.Quit
oie=.null.
oShell=.null.

CLEAR DLLS



>>?oie.Document.Body.InnerHTML
>
>That doesn't return the correct result either.
Previous
Reply
Map
View

Click here to load this message in the networking platform