PDA

Click to See Complete Forum and Search --> : Multiple executions with Inet


jejacks0n
Oct 15th, 2000, 05:23 PM
I want to execute multiple ftp commands using the Inet component.

The code looks like this

Inet1.Execute , "GET standard.eb2 c:\standard.eb2"
Inet1.Execute , "GET includes.eb2 c:\includes.eb2"
Inet1.Execute , "GET users.eb2 c:\users.eb2"

But I get an error message that says "Still executing last request."

What is the best way to remove this problem?..

I've tried checking the Inet state to make sure it was finished, but couldn't really do anything with that.

Any Ideas?

Jeremy

Dim
Oct 15th, 2000, 10:48 PM
'Place this in between each inet action
'Action
Do While Inet1.StillExecuting
DoEvents
Loop
'Action


Gl,
D!m

jejacks0n
Oct 15th, 2000, 11:09 PM
Thanks.. I actually tried something very similar. Can you tell me why this didn't work?

Do until Inet1.StillExecuting = false
Loop

Anyway, thanks for the help. =).

Jeremy

Dim
Oct 15th, 2000, 11:24 PM
Could it be because you left out the DoEvents
Which pauses the sub on that action until it's complete.

D!m

Dec 29th, 2000, 08:40 AM
If you just want it to send a page request to the site and not actually download the source then try this:



Private Sub Inet1_StateChanged(ByVal State As Integer)
If Inet1.state=7 then
Inet1.Cancel
End If
End Sub


State 7 means that it has sent a request to the server and its responding....

gantic