|
-
Jan 4th, 2001, 08:44 PM
#1
how can i make this script pause in between downloads
it keeps skipping the first strurl and going to the second
here is my complete code just in case something has to be done below
'----------------------------------------
'- Name: Sam Huggill
'- Email: [email protected]
'- Web: http;//www.vbsuare.com/
'- Company: Lighthouse Internet Solutions
'- Date/Time: 13/11/99 21:33:23
'----------------------------------------
'- Notes:
'
'----------------------------------------
Option Explicit
Private Sub cmdAbout_Click()
frmAbout.Show vbModal
End Sub
Private Sub cmdGetPage_Click()
Inet1.AccessType = icUseDefault
Dim b() As Byte
Dim strURL As String
' Presuming this is still a valid URL.
strURL = "http://msdn.microsoft.com/library/devprods/vs6/vbasic/vb98/vbmsgldBadVBXVersion.htm"
strURL = "http://msdn.microsoft.com/library/welcome/dsmsdn/msdn1.htm"
' Retrieve the file as a byte array.
Inet1.Cancel
b() = Inet1.OpenURL(strURL, icByteArray)
Dim fName
fName = Split(strURL, "/")
'fName (UBound(fName))
Open "c:\" & fName(UBound(fName)) For Binary Access _
Write As #1
Put #1, , b()
Close #1
'MsgBox "Done"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case icConnected
SetStatus "Connected"
Case icConnecting
SetStatus "Connecting"
Case icDisconnected
SetStatus "Disconnected"
Case icDisconnecting
SetStatus "Disconnecting"
Case icError
SetStatus "Error: " & Inet1.ResponseInfo, True
Case icReceivingResponse
SetStatus "Receiving response"
Case icRequesting
SetStatus "Requesting"
Case icRequestSent
SetStatus "Request Sent"
Case icResolvingHost
SetStatus "Resolving host"
Case icResponseCompleted
SetStatus "Response completed"
Case icResponseReceived
SetStatus "Response received"
End Select
End Sub
Private Sub SetStatus(strMsg As String, Optional blnErr As Boolean = False)
If (blnErr = True) Then
lblStatus.ForeColor = vbRed
Else
lblStatus.ForeColor = vbBlack
End If
lblStatus = strMsg
End Sub
thank you in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|