Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Downloading files from IE using VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00791605
Message ID:
00791863
Vues:
22
This may help you to get started, although I only included the log in scripts, not
the part that clicks on a link for a file, etc.
Steve Elster

GenerateSetFormFields.csp from ClrScript tells me that
the field names on the web page http://www.levelextreme.com

SetActiveForm("", 2);
SetFormField("Username", "");
SetFormField("Password", "");

With this info, use VFP to login

clear
release all like o*
PUBLIC oie

myUsername = "xxx"
myPassword = "xxx"

myurl = "http://www.levelextreme.com/"
oie = createobject('internetexplorer.application')
oie.navigate2( myurl )
oie.visible = .t.
do wait_for_page

with oie
** form 1 corresponds to form 2 -- from ClrScript
with .Document.forms(1)
.Username.value = myUsername
.Password.value = myPassword
.Submit
endwith
do wait_for_page
endwith

proc wait_for_page
stime = time()
do while oie.Busy
wait wind "Please wait... Internet Explorer is busy " + time() time 1
enddo
do while lower(oie.Document.ReadyState) <> "complete"
wait wind "Please wait...while page downloads " time 1
enddo
endproc
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform