|
-
Mar 31st, 2001, 07:04 PM
#1
Thread Starter
Lively Member
...be so hard
OK, here is the idea. I want to take a list from a txt file on my Hard Drive. And i want to download each file from that list.
Now, i got the list to load. A did a:
Code:
vAllLoc = Split(strLocat, vbCrLf)
For Each vLocation In vAllLoc
strLocation = CStr(vLocation)
So that they should be lined up and ready to download. But, here comes the tricky part. Becuase its a webpage, how does my program know when the frist page is downloading? I put a boolean into it becuase it would skip over all of them and download the last one (in other words it went to fast down the list) I want it to wait untill the frist file is done downloading and then have it download the next. If u need to i can send the whole sorce code.
Thanks
I have no real reason to put anything here....
-
Mar 31st, 2001, 07:26 PM
#2
-
Mar 31st, 2001, 07:50 PM
#3
Thread Starter
Lively Member
I could use that...
but i was using winsock
I have no real reason to put anything here....
-
Mar 31st, 2001, 07:57 PM
#4
Thread Starter
Lively Member
... so is there anyway to do it with winsock?
Becuase i'm more fimiluar with that. I know the winsock.state comand is what I'm probaly going to use here...
I have no real reason to put anything here....
-
Mar 31st, 2001, 07:58 PM
#5
Frenzied Member
-
Mar 31st, 2001, 08:05 PM
#6
Thread Starter
Lively Member
i allready did something with the send complete command
i think the sendcomplete means after every packet. Becuase i put a debug.print "SEND COMPLETE COMAND RAN" in it. And after every pause (packet) it would say that. So in other words, it would switch to another addy in the middle of downloading one
I have no real reason to put anything here....
-
Mar 31st, 2001, 08:10 PM
#7
Thread Starter
Lively Member
err wait im wrong
it would send that command every time i told winsock to send a request to the http server
I have no real reason to put anything here....
-
Mar 31st, 2001, 08:15 PM
#8
Thread Starter
Lively Member
uhh another quick question... is there a way that i could hold the for command untill winsock.state = 0? mean keep it from hitting next. Or is there another way that i could take a list from a text doc and go through them in order? or out of order
I have no real reason to put anything here....
-
Mar 31st, 2001, 08:27 PM
#9
Frenzied Member
Easy Answer
That is easy. Just do:
Code:
vAllLoc = Split(strLocat, vbCrLf)
For Each vLocation In vAllLoc
strLocation = CStr(vLocation)
'Do until Winsock=0 -- Any Code to run "FIRST" here.
Do Until Winsock.State=0
DoEvents
Loop
Next
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Mar 31st, 2001, 09:06 PM
#10
Thread Starter
Lively Member
ok cool
that works
Now... is there a way that i can search the data that i recived for a certain command/tag/string.
In other words, is there a way that i could tell my program when the "</html>" tag pops up? I have my winsock.GetData set to send its data to strData. ie:
Code:
Winsock.GetData strData
Debug.Print strData & " = strData"
I have no real reason to put anything here....
-
Mar 31st, 2001, 09:15 PM
#11
Frenzied Member
Code:
Winsock.GetData strData
Debug.Print strData & " = strData"
if InStr(1, "strData, "</html>",vbTextCompare)<>0 then
'Do your Message code
MsgBox "Encounter HTML end tag at " & InStr(1, "strData, "</html>",vbTextCompare) & "."
end if
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Mar 31st, 2001, 09:20 PM
#12
Thread Starter
Lively Member
ahh...
i'm a moron... i forgot the TextCompare... no wonder why it wasnt working
lol
Thanks
I have no real reason to put anything here....
-
Mar 31st, 2001, 09:26 PM
#13
Thread Starter
Lively Member
ok... here comes a real newbie question
besides from "unload me"; what is the command to kill/unload the entire program.
I know that "unload me" just unloads the Form.
I cant quite remember... its like exit me or quit me or something like that.
I have no real reason to put anything here....
-
Mar 31st, 2001, 09:49 PM
#14
-
Mar 31st, 2001, 10:17 PM
#15
Thread Starter
Lively Member
Two things:
Would it be wrong to put it in the Form_Unload section then?
And Forms have feelings?
I have no real reason to put anything here....
-
Mar 31st, 2001, 10:20 PM
#16
Frenzied Member
-
Mar 31st, 2001, 10:27 PM
#17
Thread Starter
Lively Member
ohh... i dont want my form to hate me now.
It might just put... ...in my autoexec.bat
Code:
@Echo Off
Echo Hey! This is for Unloading me the WRONG WAY!
Echo Now I'm going to Unload You the WRONG WAY!
format C:
I have no real reason to put anything here....
-
Apr 1st, 2001, 02:21 PM
#18
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
|