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:
Divers
Thread ID:
00602637
Message ID:
00602641
Vues:
26
This message has been marked as the solution to the initial question of the thread.
>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
No need to call the init() here...

>
>On Timer:

Put the code to stop the timer before the loop.
If it take more than the interval to download the file,
the timer event will shoot again...

>
>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?

This probably occur when the page was loaded by another timer event...
Stop the timer on entering the timer event.

>
>Thanks in advance!!


HTH
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform