Click here to Skip to main content
15,743,429 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to download files from internet automatically using download accelerator
Dear friends,
I am trying to create a vb macro to download files from internet automatically. So far, I have written code which allows me to get redirected download link, and takes me to the popup of orbitdownload asking me to click "download button" (after do while loop in the code given below). I want to click that download button of orbit downloaded in the same script or another script. How can i do that. Any help will be appreciable.

Sub getredirectedurls()

Dim i, j As Long
Cells(2, 1).End(xlDown).Select 'to get last row
j = ActiveCell.Row

For i = 2 To j
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
myIE.Navigate Cells(i, 1).Text
Do While myIE.Busy
Loop
Cells(i, 2).Value = myIE.Document.URL
myIE.Quit
Set myIE = Nothing
Next i
'sample url http://link.songs.pk/song1.php?songid=8000
End Sub
Posted
Updated 12-Dec-10 16:45pm
v3

I am confused which VB are you using (VB6 / VB.NET)?

SendKeys is the answer.

For .NET below is a better example:
Sending Keystrokes to another Application in C#[^]
 
Share this answer
 
Thanks venkatash, thats what i wanted. now its working fine for me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900