Jump to content

Cmd Window Problem


Watt
 Share

Recommended Posts

How can i get data/strings/chars from a CMD window?

<{POST_SNAPBACK}>

2 methods.
  • If the command you used outputs to stdout (standard output) then you can pipe it to a file, and have AutoIt read that. To do this, just use command > file.txt and read the file for any output data.
  • If the command returns an exit code, use RunWait(), and store the return to a variable to get the exit code.
You cannot get the text that is in a command window using AutoIt.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

HI!!

Sorry, but the output of the CMD process has a moving progress bar (chars), and a percent number. I need the percent number. If i transferred the output (>) into a file, but the size of the output file was growing because of the progress bar... i tried to open this file and read in it, but i could not, always got back the same string... :ph34r:

006% ####......................................................................
006% ####......................................................................
006% ####......................................................................
006% ####......................................................................
006% ####......................................................................

This program what i run is the "nerocmd" from ahead...

THX

Link to comment
Share on other sites

Alt+Space activates the window menu; E,S,Enter selects all text and copies it to the clipboard

$title = "Command Prompt";change as needed

WinActivate($title)
WinWaitActive($title)
Send("!{SPACE}es{ENTER}")

$text = ClipGet()

; sleep and repeat the above and compare the text
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

HI!

THX for alt+space!!!! useful thing :ph34r: i have to translate the E and S into the hungarian XP :(

By the way, will it work if i hide the CMD window? I will try... I am so tired...

CyberSlug if u have time (?) plz watch my other topic in BUG REPORT (FileSelectFolder). It is very interesting....

Thx

Watt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...