Page 1 of 1

Opening an internet link on MacOS

Posted: Wed Aug 04, 2010 9:05 pm
by Andre
On Windows I just use

Code: Select all

RunProgram("http://www.purebasic.com")
to open my favourite Internet Browser and load the given website.

On MacOS this doesn't work. What must be do to get the same result?

Thanks!

Re: Opening an internet link on MacOS

Posted: Wed Aug 04, 2010 9:57 pm
by freak

Code: Select all

RunProgram("open", "http://www.purebasic.com", "")

Re: Opening an internet link on MacOS

Posted: Wed Sep 04, 2013 4:40 pm
by DoubleDutch
I tried this, it works with URLs pointing to websites - but not to a dmg file on a website.

Any idea on how to start a download of a file on OSX?

Re: Opening an internet link on MacOS

Posted: Wed Sep 04, 2013 6:30 pm
by Shardik
DoubleDutch wrote:I tried this, it works with URLs pointing to websites - but not to a dmg file on a website.

Any idea on how to start a download of a file on OSX?
Have you already tried installgentoo's DownloadFromURL() example code? I have just successfully downloaded a dmg file with his code.

Re: Opening an internet link on MacOS

Posted: Wed Sep 04, 2013 7:06 pm
by DoubleDutch
Thanks for the link, not seen it before. Will take a look. :)

Re: Opening an internet link on MacOS

Posted: Thu Sep 05, 2013 10:07 am
by Fred
ReceiveHTTPFile () should also be OK with 5.20.

Re: Opening an internet link on MacOS

Posted: Thu Sep 05, 2013 11:32 am
by DoubleDutch
I was thinking of something external (under the users control) that would start the download - like on Windows if you start IE with a url that contains a file it will start to download it.

I've got around it by pointing to a normal webpage, then the actual website initiates the download by doing a redirect after a couple of seconds.