Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to automate web forms?
Message
De
02/05/2007 18:07:48
Peter Easson
Catalina Trading
Sydney, Australie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01221858
Message ID:
01222017
Vues:
15
It's simpler than you think.
cValue = "JA0000165801"
oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("http://www.fastway.com.au")
IF WaitForReadyState(oIE)
        oIE.Document.FTrace.TAG.value = ALLTRIM(cValue)
        oIE.Document.FTrace.Submit()
        oIE.Visible = .t.
ELSE
        MESSAGEBOX("Internet Connection timed out",64,"Apparently no Internet Connection")
ENDIF 

oIE = null
The WaitForReadyState function can be found by searching for SmartSMS on the fox wikis.
Basically, this code opens up an instance of IE. Waits for it to be ready. Inserts the value in the field and then submits the form. Normally, cValue should come from another source (not hard coded :-))
To understand this fully, you should 'view' the source on that website page.

Hope this helps

Peter Easson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform