Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Acessar UT
Message
From
10/10/2002 09:43:19
Cleber Ferrari
Capta Tecnologia
Brazil
 
 
To
10/10/2002 09:25:36
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00709795
Message ID:
00709810
Views:
16
tente copiar este codigo :
lcUserName = "seuusuario"
lcPassword = "suasenha"

oIE = Createobject("InternetExplorer.Application")
oIE.Navigate("www.levelextreme.com")

If navcomplete(oIE)
	oIE.Document.Forms(0).username.Value = lcUserName
	oIE.Document.Forms(0).Password.Value = lcPassword

	oIE.Document.Forms(0).Submit()
	oIE.Visible = .T.
Else
	Release oIE
Endif


Function PageCatalog
	Lpara oIE
	Set Talk Off
	Create Cursor PageCatalog (ItemIndex i, InnerText M, InnerHTML M)
	For i = 0 To oIE.Document.Body.All.Length - 1
		m.ItemIndex = i
		m.InnerText = oIE.Document.Body.All(i).InnerText
		m.InnerHTML = oIE.Document.Body.All(i).InnerHTML
		Insert Into PageCatalog From Memvar
	Endfor
Endfunc

Function navcomplete
	Lpara toIE, tnTimeout
	lnTimeOut = Iif(Type("tnTimeOut") = "N", tnTimeout, 60)
	lnElapsedSeconds = 0
	lnStartSeconds = Seconds()
	* First, poll oIE.ReadyState until it equals 4, or we time out
	Do While .T.
		If toIE.ReadyState = 4
			* Then, toIE.Document.ReadyState until it equals "complete", or we time out
			Do While .T.
				If toIE.Document.ReadyState = "complete"
					Return .T.
				Endif
				If (Seconds() - lnStartSeconds) > lnTimeOut
					Return .F.
				Endif
			Enddo
		Endif
		If (Seconds() - lnStartSeconds) > lnTimeOut
			Return .F.
		Endif
	Enddo
Endfunc
Previous
Reply
Map
View

Click here to load this message in the networking platform