Author Topic: Progressbar for URLDownloadToFile  (Read 6602 times)

0 Members and 1 Guest are viewing this topic.

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Progressbar for URLDownloadToFile
« Reply #15 on: July 13, 2021, 05:05:32 pm »
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Progressbar for URLDownloadToFile
« Reply #16 on: July 13, 2021, 05:08:05 pm »
@xra7en Worked for me:

  [ You are not allowed to view this attachment ]  

Make sure that when you are pasting the link it isn't immediately trying to download. It should ask for a link and then immediately ask for a file name.
« Last Edit: July 13, 2021, 05:10:23 pm by SpriggsySpriggs »
Shuwatch!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Progressbar for URLDownloadToFile
« Reply #17 on: July 13, 2021, 05:33:01 pm »
your on windows 11, Im still using (by choice) windows 7.
I have noticed that when I use my 10 rig, I run into less issue (not always).

And the app does indeed ask for a file an not download right away.

I noticed when I used win10 with powershell download scripts, they work good, win7 was a hit and miss. Mostly because win7 comes with PS2, vs PS5+
The scrip is great.. and there are no errors, but when I run it, it craps out on me.

Starting to believe it is a win7 issue.
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Progressbar for URLDownloadToFile
« Reply #18 on: July 13, 2021, 05:39:46 pm »
Could be, but I ran this on 10 on my work PC. Not 11
Shuwatch!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Progressbar for URLDownloadToFile
« Reply #19 on: July 13, 2021, 05:49:41 pm »
I was just tinkering around with it again and it worked ! Only once!
Not sure why, because when I repeat it, it fails again.

so that is weird..
I'll keep playing with it... thanks for the code...
not sure why its being goofy on my end.

edit:
also noticed it is not giving me an error.
« Last Edit: July 13, 2021, 05:58:43 pm by xra7en »
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Progressbar for URLDownloadToFile
« Reply #20 on: July 13, 2021, 06:10:03 pm »
Win32 API is weird, sometimes. It can be very wonky. Let me know if you ever need more help.
Shuwatch!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Progressbar for URLDownloadToFile
« Reply #21 on: July 13, 2021, 06:20:53 pm »
absolutely - you are very educational, albeit over my head a bit LOL.

I'll tinker with it for awhile and see why it downloads one time and not another.


edit:
this link worked

https://www.mediafire.com/file/wl3bcf75p6ledep/torbrowser-install-win64-10.5_en-US.exe/file
i repeated this link a few times, so far so good.


this one did not
https://github.com/wavebox/waveboxapp/releases/download/v4.11.6/install_wavebox_4_11_6_x64.exe

stil cant get
https://www.7-zip.org/a/7z1900-x64.exe
this to work.

is it possible that it is running into a security protocol? (win10 might process those differently from win7)
« Last Edit: July 13, 2021, 06:27:58 pm by xra7en »
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Progressbar for URLDownloadToFile
« Reply #22 on: July 13, 2021, 07:11:07 pm »
If this works with a c-based library, you may need CHR$(0) string termination.  Make certain there’s a CHR$(0) added to the end of your link and see if that changes anything.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: Progressbar for URLDownloadToFile
« Reply #23 on: July 13, 2021, 08:02:04 pm »
no joy.. some links work, others don't
(oddly the 7zip link does not work)
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Progressbar for URLDownloadToFile
« Reply #24 on: July 13, 2021, 09:00:19 pm »
Sometimes this is caused by the request not matching what they want and so they block the request. All of your links worked for me. I might have to look at that User Agent variable
Shuwatch!