Page 2 of 3
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 01:45
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
Remind me again, is there a way to make a toolbar button activate a script? Or a catalogue entry activate a script?
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 01:52
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.
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 07:41
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?


Impressive, TheQwerty! Not only can you read binaries, you also read thoughts!

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.
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 11:41
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

Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 14:37
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.
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 14:56
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 ?
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 15:01
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?
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 16:04
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.
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 16:52
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.
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 03 Sep 2008 22:01
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)
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 04 Sep 2008 16:17
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
Side note: what's that other combobox on the Go To window? Some in dev thing you forgot to hide or something?

Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 04 Sep 2008 20:06
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
Side note: what's that other combobox on the Go To window? Some in dev thing you forgot to hide or something?


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...
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 04 Sep 2008 21:28
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
Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 04 Sep 2008 21:58
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!
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!

Re: 2 bugs in 7.50.0000 version with firefox 3 ?
Posted: 05 Sep 2008 20:32
by jacky
oh yeah, "unofficial" or not I'm liking this one a lot!
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!
Many thanks again for that one!