Jump to content

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

Like my program MChat. I want to take the info from the core, and save it to a log(which overwrites every 2 secs) and displays into a GUI Edit Box, but the edit box scrolls all the way down. Can you create an example?

Posted

what DaveF is working on... is that sort of like a packet sniffer? sinse it gets the info as it's being processed?

FootbaG
Posted

  layer said:

what DaveF is working on... is that sort of like a packet sniffer? sinse it gets the info as it's being processed?

<{POST_SNAPBACK}>

Sure... like a fly-swatter is good for hunting elephants.
Posted

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
Posted

  Valik said:

I think you need to learn what a packet is.

<{POST_SNAPBACK}>

rofl!! ;):idiot: i knew i was some where a long the lines of no where on that guess :D:lol:
FootbaG

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
  • Recently Browsing   0 members

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