Jump to content

Command Line Information


 Share

Recommended Posts

I want to be able to get info from a cmd window but all the ways I have seen have been involving mouseclicks. Like:

MouseClick(WINDOW)

Send("ES{ENTER")

I want to be able to go:

$title = "C:\WINDOWS\System32\cmd.exe"

Run($title)

WinWaitActive($title)

ControlSend($title, "", "", "Some Command That Returns Info")

Sleep(100)

$info = CommandRead($title) ; Reads the CommandLine

FileWrite("test.txt", $info)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

IS THIS POSSIBLE?

If not when will AutoIt have the function?

Thank you,

AutoIt Smith

Edited by AutoIt Smith
Link to comment
Share on other sites

What kind of information are you wanting to get from the comspec window?

Most DOS commands allow redirecting to a file or pipe, so it may be easier to just dump the output to a log file. I'd actually recommend redirection over screen-scrapes, since some apps may flush/overwrite the current screen. ...Just something to keep in mind.

Link to comment
Share on other sites

heheh, i just found out what a packet sniffer is today... or at least i made a hypothesis... "i think a packet sniffer is a program that retrieves the outgoing information from another program" ? :idiot:

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