Allow Downloads from Websites with Browser Widget?

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bkyan
Posts: 13
Joined: Mon Jun 18, 2018 8:20 am

Allow Downloads from Websites with Browser Widget?

Post by bkyan » Mon Jun 18, 2018 10:19 pm

Hello!

In the (regular) Chrome browser, when you click on a file to download on a website, it asks you where you want to save the file, and proceeds with the download. When I try the same thing with LiveCode's Browser Widget, it does nothing, as far as I could tell. Is there a way to get LiveCode's Browser Widget to behave like the (regular) Chrome browser? (I'm running on a Windows 10 computer.)

-- Benjamin

rocco
Posts: 1
Joined: Mon May 01, 2017 3:55 pm

Re: Allow Downloads from Websites with Browser Widget?

Post by rocco » Tue Feb 04, 2020 7:52 pm

Hi Benjamin,
have you solved?
If yes, how?

Thank you in advance
Rocco

bkyan
Posts: 13
Joined: Mon Jun 18, 2018 8:20 am

Re: Allow Downloads from Websites with Browser Widget?

Post by bkyan » Fri Feb 07, 2020 1:47 am

Rocco,

I haven't solved this yet, but I spoke with the LiveCode team, and they are going to try to help me out. I'll post the solution, here, when I hear back.

-- Benjamin

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Allow Downloads from Websites with Browser Widget?

Post by [-hh] » Fri Feb 07, 2020 6:39 pm

Until that you could simply use browserUnhandledLoadRequest, e.g.

Code: Select all

on browserUnhandledLoadRequest pUrl
  -- set download target:
  set itemdel to slash
  put item -1 of pURL into tF
  set itemdel to comma
  ask file "Download as:" with tF
  if it is empty then exit browserUnhandledLoadRequest
  -- download:
  put url(pURL) into url("binfile:"&it)
end browserUnhandledLoadRequest
Put the above into the script of the widget (or the script of the card containing the widget).
shiftLock happens

bkyan
Posts: 13
Joined: Mon Jun 18, 2018 8:20 am

Re: Allow Downloads from Websites with Browser Widget?

Post by bkyan » Sun Feb 09, 2020 3:25 am

Thanks, [-hh]! I'll give that a try!

--Benjamin

D4vidrim
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 61
Joined: Fri May 31, 2013 9:32 am

Re: Allow Downloads from Websites with Browser Widget?

Post by D4vidrim » Fri Jun 04, 2021 6:45 am

Hi!
Any luck?

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Allow Downloads from Websites with Browser Widget?

Post by Klaus » Wed Nov 17, 2021 12:16 pm

Hi bethoust,

[-hh] (Hermann Hoch) was a university professor for mathematics, so you bet he wrote it by himself.
Unfortunately he passed away earlier of this year, a very tragic loss.


Best

Klaus

stam
Posts: 2599
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Allow Downloads from Websites with Browser Widget?

Post by stam » Wed Nov 17, 2021 10:17 pm

I keep finding snippets of Herman's code and he does have some pretty nice widgets still uploaded to a website. Clearly he was an extremely talented LC dev and a force for good (development). I didn't realise he'd passed away this year, very sad to hear that - a tragic loss indeed :(

Post Reply

Return to “Internet”