How can I get the output by a DOS command by code? (Without passing it trough a file)
Printable View
How can I get the output by a DOS command by code? (Without passing it trough a file)
Look at Do Event. Allow pass off to other programs.....
Is there a specific DOS command you want to execute????
You can't get the output from a dos box using vb code. You'd have to run the output to a tmp-file which you'd then read.
ok :( thx anyway :)
erm Jethro, I'm very unsure what you mean... DoEvents allows windows to handle the WMs as I know..?
What you want to do l think is:
1. Execute a DOS command
2. Have access in vb to the results generated by that command
Is this right???????? What DOS command, maybe a work around using "C" or C++ to emulate the actual command and pass results ByVal back to the vb calling routine.
Have dones this, (at least Phantomd did it) for a couple of Unix calls.
What Jethro is saying, is to code the dos program in vb (or use an api call) so you wont have to use the dos cmomand at all.
But I guess that's not the point :)
In our case of course vb caren't utilise results of unix command line executes, but you can work around this by use of either a C routine to mimic the command, or as Rodik suggests, (this being a Win/Dos environment) by vb code or API calls.
If you want a specific DOS command this shouldn't be a problem.
Hope this helps, anyway logging gotta go do an ACCESS conversion for GST, (friggin Government has change Oz from a Sales Tax environment to a Goods and Services Tax environment).
:)
Just love re-coding stuff because the politicians keep changing the rules. At least with the vb apps all the business rules are in classes:):):):)
Fox, what do you think about text recognition?
Fox did you solve your problem? The best way might be to output to a text file as already said, read the file then delete the file when your done.
eg:
shell("dir *.* > temp.txt")
What the... ;)
noone
If you read my first post you know I dont want to do that...
kedaman
huh? That has nothing to do with this thread right? well, what do you mean? Scanning pictures and recognize text?
Jethro
Mhm... good idea! But I still have the problem how to catch the output without files then i think... any ideas?
If a single DOS command, will pass on to phantom and see what he thinks....he does all our low level stuff.
If multiple DOS command parser, then no ideas sorry.
Will muck around with the Dir command and see what can be done........
Guess something like
Shell("dir *.txt > clipboard or something")...hmmm....need to somehow get output to RAM location then extract from there.....this is probably beyond my knowledge, will post to local "C" site and see what the guys think there..
Probably that doesn't help you, just indicating am thinking on the problem and seeking help from the local computer guys & girls.
Maybe Megatron or Gen-X can think of an answer
Well i'm sure you would rather dump it in a file than use text recognition, you can't even get a whole page, well actually can with |more but that's an ugly way to do it. Aaron posted a code for textrecognition somwhere you could search for it