Retrieving Files from the Internet

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Retrieving Files from the Internet

Post by winstein » Mon Nov 30, 2015 2:58 am

One of the Macros I worked on requires that I use a certain type of file in order to operate, but right now my colleague has this idea of retrieving said file on the internet, so used a website where a file is to be downloaded when you entered this link.

Of course, it doesn't work because the ReadFile function cannot read files found on the internet, nor can it verify of its existence using IfFileExists.

Is there a way to retrieve files on the internet to be read?

Thanks for reading.
PPQ

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Retrieving Files from the Internet

Post by JRL » Mon Nov 30, 2015 2:25 pm

You could use HTTPRequest>. Note that the URL and file name may be case sensitive.

Code: Select all

HTTPRequest>https://www.mjtnet.com/software/FindColor.zip,%desktop_dir%\findcolor.zip,GET,,,,,,

winstein
Pro Scripter
Posts: 84
Joined: Mon Nov 26, 2012 3:44 pm

Re: Retrieving Files from the Internet

Post by winstein » Tue Dec 01, 2015 5:22 am

That function does what I wanted it to do.

Thank you!
PPQ

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts