Results 1 to 14 of 14

Thread: Get DOS output

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Question

    How can I get the output by a DOS command by code? (Without passing it trough a file)

  2. #2
    Guest

    Question Not clear on what you are asking

    Look at Do Event. Allow pass off to other programs.....

    Is there a specific DOS command you want to execute????

  3. #3
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321
    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.
    Signed, Rodik ([email protected])
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  4. #4

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    ok thx anyway

    erm Jethro, I'm very unsure what you mean... DoEvents allows windows to handle the WMs as I know..?

  5. #5
    Guest

    Smile Fox okay by reading the post again its a bit clearer

    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.

  6. #6
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321
    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
    Signed, Rodik ([email protected])
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  7. #7
    Guest

    Thumbs up That's right Rodik

    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).

  8. #8
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Smile Sounds fun

    Signed, Rodik ([email protected])
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  9. #9
    Guest

    Angry Rodik, yeap just jumpoing out of my shoes

    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

  10. #10
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Fox, what do you think about text recognition?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  11. #11
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    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")
    "People who think they know everything are a great annoyance to those of us who do."

  12. #12

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    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?

  13. #13
    Guest

    Question Depends on what you want really

    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


  14. #14
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width