2 bugs in 7.50.0000 version with firefox 3 ?

Things you’d like to miss in the future...
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by lukescammell »

Code: Select all

::download2 "http://www.xyplorer.com/download/xyplorer_7.50_beta_noinstall.zip", "<xypath>\_installs\xyplorer_7.50.xxxx.zip"
Too cool :D

Remind me again, is there a way to make a toolbar button activate a script? Or a catalogue entry activate a script?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

lukescammell wrote:Remind me again, is there a way to make a toolbar button activate a script? Or a catalogue entry activate a script?
Toolbar not yet no, Catalog item sure: just use quick scripting as anywhere else (e.g. ::msg "hi!"; load "MyScriptFile";) or type in a multi-line script, as soon as it's multiline XY assumes it's a script.
Proud XYplorer Fanatic

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by admin »

jacky wrote:
admin wrote:
admin wrote:
TheQwerty wrote:I assume this is using the same code, so perhaps Download2 may soon become public? ;)
:mrgreen: Impressive, TheQwerty! Not only can you read binaries, you also read thoughts! :wink:
Okay, play with it (but use "download2" instead of "download") :

Code: Select all

      ' download file from the internet
      ' syntax: download SourceUrl, [TargetFile]
      '   SourceUrl:  any URL (http:// or ftp:// or file:///)
      '   TargetFile: defaults to <curpath>\sourcefilename
      ' ::download "http://www.xyplorer.com/download/xyplorer_6.80_beta_noinstall.zip", "<curpath>\xy.zip"
:)
Nice one there, but before it's made public it'd be nice to have a way to get feedback of statusbar (% when/if possible, or size downloaded so far otherwise). (Ideally we could send a text to be used on statusbar as well - as prefix, or using %s)
That's the reason why I did not publish it yet. Feedback and Cancelling is an unsolved problem yet.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

admin wrote:That's the reason why I did not publish it yet. Feedback and Cancelling is an unsolved problem yet.
Well, I don't know how you do the downloading atm, but looking at this example it seems that done that way, you could easily add both I'd say (maybe not a percentage, just a size downloaded so far, but that's good enough for me anyways), and either it's downloaded to a file or into a variable!

Of course if you're doing this completely differently, then I don't know ;)
Proud XYplorer Fanatic

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by admin »

jacky wrote:
admin wrote:That's the reason why I did not publish it yet. Feedback and Cancelling is an unsolved problem yet.
Well, I don't know how you do the downloading atm, but looking at this example it seems that done that way, you could easily add both I'd say (maybe not a percentage, just a size downloaded so far, but that's good enough for me anyways), and either it's downloaded to a file or into a variable!

Of course if you're doing this completely differently, then I don't know ;)
Yes, I know this way. I used it already for another function in the making (ReadURL). I might subsume it under ReadFile... not sure yet. The Download2 uses a different API, but comes to similar results (only without the intermediate string buffer).

The big problem with both is: they are not asynchronous. If you download a large file you will have to wait until it's done.

I know of another way to do it alright, but it's very tricky to do -- that's why i put it on the back burner. Those functions are nice, but not that important.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

admin wrote:The Download2 uses a different API, but comes to similar results (only without the intermediate string buffer).
Well, the buffer is good when reading to a variable, no need for files then ;) Also, in that example it seems that the download is going through a loop, so can't you just check there if ESC was pressed or not, and if so just stop calling InternetReadFile but exit the loop and do a InternetCloseHandle ?
Proud XYplorer Fanatic

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by admin »

jacky wrote:
admin wrote:The Download2 uses a different API, but comes to similar results (only without the intermediate string buffer).
Well, the buffer is good when reading to a variable, no need for files then ;) Also, in that example it seems that the download is going through a loop, so can't you just check there if ESC was pressed or not, and if so just stop calling InternetReadFile but exit the loop and do a InternetCloseHandle ?
Of course, but that's not good enough. Or is it? Don't you expect asynchronous download?

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

admin wrote:Of course, but that's not good enough. Or is it? Don't you expect asynchronous download?
Well, it'd be best of course, but honestly for the scripts I have in mind, I will be waiting for the download to be over anyways, because from then something else will be done by the script. If I just need to download something, I'll use something else than my file manager ;)

So, for me, just like I wait after I start a search, I'll wait after I start a download, so that'd be good enough yes.
Proud XYplorer Fanatic

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by j_c_hallgren »

And from the peanut gallery, I'd add that I don't foresee this download command being used on a ISO file or a movie or other huge file so waiting until it's done seems most practical so that one could then do next task/command based on results of download.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by graham »

From the other peanut gallery...
Maybe the answer is to rename it as a small file download and set a limit. If it exceeds then a message and no download. The size limit would mean not exceeding n (user ini setting? or hard coded limit)

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

the new command download looks pretty nice :) I have to ask, though: will there be a way to "load" an URL into a variable soon (ReadURL) ? Because, at least as far as I'm concerned, this will be the most common case of use of such downloads, when it's an actual page which content must be treated by the script, not just a simple file download.

So then, I could get ride of the use of external app (e.g. wget & clip) and have my scripts be easier to both write & work with 8)

Side note: what's that other combobox on the Go To window? Some in dev thing you forgot to hide or something? ;)
Proud XYplorer Fanatic

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by admin »

jacky wrote:the new command download looks pretty nice :) I have to ask, though: will there be a way to "load" an URL into a variable soon (ReadURL) ? Because, at least as far as I'm concerned, this will be the most common case of use of such downloads, when it's an actual page which content must be treated by the script, not just a simple file download.

So then, I could get ride of the use of external app (e.g. wget & clip) and have my scripts be easier to both write & work with 8)

Side note: what's that other combobox on the Go To window? Some in dev thing you forgot to hide or something? ;)
:lol: Yeah, this is BETA, man! Yep, I'm working on the new combobox: the upper one is the one that speaks Chinese... you can play with it but it has no function. As I said before I don't like it and will throw it away ASAP. Something better will replace it (but only in 7.70).

ReadURL will come...

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by admin »

readurl: Next upload will work already (no time for adding it to the change log, but it's a very simple command:

Code: Select all

        ' action: read URL into variable
        ' syntax: readurl output, sourceurl
        ' ::readurl $a, "http://www.xyplorer.com/download/remote.xys"; text $a

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

admin wrote:readurl: Next upload will work already (no time for adding it to the change log, but it's a very simple command:

Code: Select all

        ' action: read URL into variable
        ' syntax: readurl output, sourceurl
        ' ::readurl $a, "http://www.xyplorer.com/download/remote.xys"; text $a
Awesome! :D :D
Thanks, just tried it, works like a charm! This is so cool man, now my XY update script already doesn't require any external app (except WinRAR obviously), no more popup, it works all on its own, love it! :D
Proud XYplorer Fanatic

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: 2 bugs in 7.50.0000 version with firefox 3 ?

Post by jacky »

oh yeah, "unofficial" or not I'm liking this one a lot! :D

I have for example a few scripts I use to manage a few things and I often need to collect info from webpages, and my scripts used to open the page in ask me what the info was; now it does a few readurl and "extracts" the info on its own, and sets everything. It was nice already, but it's even easier & faster now: I launch the script, and everything gets done! :D

Many thanks again for that one!
Proud XYplorer Fanatic

Post Reply