INTERACT FORUM

Windows => Plug-in Development => Topic started by: KingSparta on August 25, 2002, 09:28:18 am

Title: I Am Trying To Download A File From The Internet
Post by: KingSparta on August 25, 2002, 09:28:18 am
The Download Dialog Comes Up
Downloads The File, But The File Is Never Saved To The Drive In The Path File Name Given.

there is also a place in the dialog that is blank "Package" is there a way to fill that blank like

Package: "U.S.A. Top 40 Database"?


Is It Me Or MJ?


Dim MyError

'Dim INIDIR As String
'    INIDIR = App.Path

       Dim MJIA As MediaJukebox.MJInternetAutomation
       Set MJIA = g_MJ.GetInternet
       
MJIA.DownloadMode = DOWNLOAD_MODE_DEFAULT
MyError = MJIA.DownloadToFile("http://home.nc.rr.com/mycddblookup/images/USATop40.csv", "C:\USATop40.csv")
' Hold This For Now MyError = MJIA.DownloadToFile("http://home.nc.rr.com/mycddblookup/images/USATop40.csv", INIDIR & "\USATop40.csv")

If MyError = 0 Then
   MsgBox ("The Database Downloaded Ok...")
Else
   MsgBox ("There Was An Error Downloading The Database...")
End If
Title: RE:I Am Trying To Download A File From The Internet
Post by: KingSparta on August 27, 2002, 10:51:10 am
Internet Downloads is not working for me

Any comments?

Is my code screwed up?

Is MJ screwed up?

If you were a Space Man on a distant planet what way does the earth rotate, clockwise or counter clockwise?
Title: RE:I Am Trying To Download A File From The Internet
Post by: Cephlen on August 27, 2002, 11:30:43 am

If you were a Space Man on a distant planet what way does the earth rotate, clockwise or counter clockwise?



Neither, it would rotate from the bottom to the top.



Code looks ok to me.. if I get some time, I will try it out.
Title: RE:I Am Trying To Download A File From The Internet
Post by: KingSparta on August 29, 2002, 07:13:13 am
Anyone?
Title: RE:I Am Trying To Download A File From The Internet
Post by: Cephlen on August 29, 2002, 09:02:17 am
DownloadToFile doesnt seem to work here either.

Try this instead:

TempFile = MJIA.DownloadToTempFile("http://home.nc.rr.com/mycddblookup/images/USATop40.csv")

FileCopy TempFile, "C:\USATop40.csv"


Worked a-ok here!
Title: RE:I Am Trying To Download A File From The Internet
Post by: KingSparta on August 29, 2002, 10:29:32 am
Good Deal

if you would have given me another month i might have figured that work around out.



Thanks again
Title: RE:I Am Trying To Download A File From The Internet
Post by: KingSparta on August 29, 2002, 10:56:00 am
And It Works!!!!

Dim TempFile

Dim MJIA As MediaJukebox.MJInternetAutomation
Set MJIA = g_MJ.GetInternet
       
MJIA.DownloadMode = DOWNLOAD_MODE_DEFAULT

DataBaseLoaded(4) = "No"

If Combo2 = "Billboard Top 100" Then
   CHARTFILE = "Top 100 Billboard.csv"
End If
   
TempFile = MJIA.DownloadToTempFile("http://home.nc.rr.com/mycddblookup/images/" & CHARTFILE)

If TempFile <> "" Then
   FileCopy TempFile, INIDIR & "\" & CHARTFILE
   MsgBox (CHARTFILE & " Database Downloaded...")
Else
   MsgBox ("There Was An Error Downloading The " & CHARTFILE & " Database...")
End If