Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IE automation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00778814
Message ID:
00778878
Vues:
21
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform