Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What can be???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
What can be???
Divers
Thread ID:
00602637
Message ID:
00602637
Vues:
55
Hi Friends!

I have this code for check on Internet if is a valid version of the program, using especific pages... (Just for demo, using a temporary page for some days)

On Start
oIE = CreateObject("InternetExplorer.Application")
oIE.visible = .f.
oIE.Navigate("www.extraofertas.com/comaco/validation/ivan01.html") //temporary page
thisform.timer1.interval = 5000
thisform.timer1.init
On Timer:
Do While oIE.Document.ReadyState <> "complete"
Enddo

lcHTML = oIE.document.documentElement.innerHTML
If Atc("Error 404", lcHTML)<>0 Then // if doesn´t exist, the program won´t work
	this.interval = 0
	oIE.Quit
	Release oIE
	thisform.caption = "Autorización Negada"
	thisform.label1.visible = .f.
	thisform.label2.visible = .f.
	thisform.label3.visible = .f.
	thisform.label4.visible = .t.
	thisform.label5.visible = .t.
	thisform.label6.visible = .t.
	thisform.label7.visible = .t.
	thisform.refresh
	thisform.timer2.interval = 12000
	thisform.timer2.init
else
	oIE.Quit
	this.interval = 0
	thisform.visible = .f.
	do form entrada
Endif
It works fine, but sometimes, this code don´t recognize DOCUMENT.... any idea?

Thanks in advance!!
By two common phrases in his vocabulary, we know Hercule Poirot was a great Developer: his use of "the little grey cells" and "order and method".
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform