//EDIT 2
I know Riz produced a Download Action plugin a while ago, that grabs multiple-files at once, but there's no callback-function intergrated and it can only handle small files. Not to put any pressure on ya, to upgrade it, Riz. LOL. :lol
There is however, a solution called Chain Downloader (produced by S0mbre) which handles multiple-files and progress-objects/stats, and which I've yet to look into in any detail. Maybe this can offer some insight ... dunno yet, as I haven't really looked.
Announcement
Collapse
No announcement yet.
Capture output of a DOS Window into AMS dynamically?
Collapse
X
-
Yes, am well aware already. It's beside the point, though. Just as Sakuya said, there's a lot that can be done via command-line that HTTP.Download can't ... least of all is that it'll lock up with multiple downloads.Originally posted by madsen View PostSince this seems to be about download, out of curiosity, why don't you simply use the integrated HTTP.Download?
It does have a callback function which you can adapt to your needs.
Here, if you can get this example to download multiple-files (with progress-meters) via HTTP.Download, then I'll stop looking at command-line solutions:
//EDIT
Actually, I probably won't stop looking, LOL. But you get my point, yeh?Last edited by mystica; 06-02-2010, 05:01 AM.
Leave a comment:
-
Wget offers a lot more functionality than HTTP.Download does, such as setting of cookies and user-agent and if we find a thread-safe way it won't block the application either. :yesOriginally posted by madsen View PostSince this seems to be about download, out of curiosity, why don't you simply use the integrated HTTP.Download?
It does have a callback function which you can adapt to your needs.
Leave a comment:
-
Since this seems to be about download, out of curiosity, why don't you simply use the integrated HTTP.Download?
It does have a callback function which you can adapt to your needs.
Leave a comment:
-
Hmmm ... started out with a simple enough question. Now my brain is hurting.
Leave a comment:
-
Yes, it was a PB written dll that reads the output of an application, console output.Originally posted by madsen View Post@Bas: have you actually achieved to capture such program's output as well or just the typical ones?
I could, as said before, write a plugin that would run the application in a new thread reading
all it's data back to AMS via an user specified callback function.
Leave a comment:
-
Oh you're funnyOriginally posted by RizlaUK View Posti hope your doing that thing for me too!

haha XD
Leave a comment:
-
It works fine outside AMS, however when in AMS, trying to read the output file (which is being constantly updated by wget) seems to produce an "cannot open text file" error, perhaps AMS cannot open files in use yet I can open it just fine by other means. I have verified the progressive updating of the file though an outside program.
Here is what I got so far:
Code:--On a button File.Run("wget http://www.somewebsite.com > out.txt 2>&1", "", "", SW_HIDE, false); Page.StartTimer(100);Note: Once wget finishes, the file gets displayed so we're not having a path problem either.Code:--On Timer pipe = TextFile.ReadToString("out.txt"); Input.SetText("Input1", pipe);
Hope this is enough to get you started. Basically this is of utmost interest for you: 2>&1 (not a misspelling, see link)
Leave a comment:
-
I've done it! Will post an example shortly and you take it from there
Leave a comment:
-
Just an example. Wget, Curl, Sed ... doesn't matter. Any command-line utility that can download via HTTP/HTTPS and display some kind of progress-stats is fine. My intention is to capture the download progress-stats as variables in AMS, so a custom progress-meter can then be built and displayed.Originally posted by madsen View Post... @mystica: your intention is to use wget "per se" or it was just an example?
Leave a comment:
-
I have made some tests earlier and seems that programs like wget keep the "focus" on their own thus not being able to read their output (like when it downloads).
I successfully read the output of other console apps (as it's being written) that are not "selfish"
@Bas: have you actually achieved to capture such program's output as well or just the typical ones?
@mystica: your intention is to use wget "per se" or it was just an example?
Leave a comment:
-
look harderI looked everywhere and I just couldn't find it!
i hope your doing that thing for me too!and a fun job for a good friend
Leave a comment:
-
Yeah, I know.. :(Originally posted by Imagine Programming View PostOi sakuya, I made you a dll once, you lost it!
It was writing the file remember? 
Perhaps I'll write a plugin later once I've fixed my ISP issues and a fun job for a good friend :yes
I looked everywhere and I just couldn't find it! D:
Leave a comment:
Leave a comment: