JS to download file?

Leafcutter John's icon

I'm trying to make a patch which can download a file from a URL. I DONT have JITTER so i was thinking JS could do it - problem is i know nothing about JS. Could someone let me know if it's possible / how to do it?

thanks,

John.

vade's icon

you can use the shell external and the 'curl' program or the 'wget'
program to download files through a command line interface. curl for
the win.

v a d e //

www.vade.info
abstrakt.vade.info

mwilliams's icon

Hi There,
I was wondering if there were any good tutorials, aside from what
ships with the product, on how to work with JavaScript in MAX?

Sorry if this is a dumb question, I am new to the product.

--
Michael

f.e's icon

google ?

Leafcutter John's icon

Thanks Vade,

but I was hoping there was a way to do this with the js or mxj objects?

Anyone else?

thanks,
j

f.e's icon

cheers

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Leafcutter John's icon

Thanks for that f.e. - i'm still sufficiently stupid regarding java for it to completely confuse me though.

If anyone has a bit of time to explain to me how to get this to work i'd appreciate it greatly.

thanks,

john.

f.e's icon

You mean, explain everything or just a few ? Come on, john burton, take
a Java tutorial on you left hand, and the Writing Java Externals manual
on your right ! What you got on this link is an already working class.
So, what you have to do is to adapt it to your needs : like a seperate
class you'll call from your Java external, or integrated in/as a Java
external. So better tell us what's your knowledge regarding Java for us
to help ;-)

f.e

f.e chanfrault | aka | personal computer music
> >>>>>> http://www.personal-computer-music.com
> >>>>>> |sublime music for a desperate people|

Leafcutter John's icon

I'm a complete newbie to Java, i find it a but confusing at the moment - finding the 'java-doc' folder helped a little. Right now i don't have time to devote to learning it so i'll put it aside.

Thanks to those who made suggestions - unless anyone has a really easy way of downloading a file from a URL i'll move along.

john.

batchku's icon

hi john,
i have a bunch of java classesfor downloading files from a URL, audio
files (aif or mp3) directly from a URL into an MSP buffer as well as
ftp download/upload.

i missed the beginning of this thread so i'm not sure what you want
exactly but it's probably possible with little/no modification to my
stuff. get in touch if.

yours,
a

Leafcutter John's icon

thanks batchku,

I'll be in touch when i finish the little tour i'm on right now.

best,

john.

equanimous's icon

@Batchku

I'm also interested to see how to save a file fetched from a website.

Thank you !