So far I've able to download the images-however in order to do that I had to use a split function that someone has gave me on the forum.
So here's the function within the module:
Function SplitURL(ByVal URI As String) As String
URI = URI.Remove(0, URI.LastIndexOf("http://")) 'Splits the url in half of the original format
' Original format - http://tbn0.google.com/images?q=tbn:BI7ZTDNCy7UkNM:http://images.ctv.ca/archives/CTVNews/img2/20071019/300_excorcist.jpg
Return URI ' Return the URI string for later use
End Function
While in the DoSearch function I have this:
Dim splitted_file() As String
Inside the DoSearch function while it's runnning a loop of all the image files within the html page - collecting I have the SplitURL function trying to split each URL then download it.
For i = 0 To main_form.WebBrowser1.document.Domdocument.images.length - 1 splitted_file = SplitURL(main_form.WebBrowser1.document.Domdocument.images(i).href) My.Computer.Network.DownloadFile(main_form.WebBrowser1.document.Domdocument.images(i).href, type_dir + "\" & My.Computer.FileSystem.GetName(splitted_file(i))) main_form.StatusText1.Text = "Downloading Images..." & splitted_file(i) main_form.ListView1.Items.Add(splitted_file(i)) Next
So when I do a run test on it-an error shows up saying:
Error 1 Value of type 'String' cannot be converted to '1-dimensional array of String'.
Because I think the SplitURL function can't put it into the splitted_file array.
ANy sugguestions?
Thanks for the help!
I promise that when this program is finally done-the ones that get this will glad they helped make this program kick ass!

New Topic/Question
Reply



MultiQuote





|