Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Downloading files from IE using VFP
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00791605
Message ID:
00791863
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform