themax90 2 Posted January 12, 2005 (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 January 12, 2005 by AutoIt Smith Share this post Link to post Share on other sites
Bartokv 1 Posted January 12, 2005 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. Share this post Link to post Share on other sites
themax90 2 Posted January 12, 2005 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? Share this post Link to post Share on other sites
sykes 0 Posted January 13, 2005 Check out the following link:http://www.autoitscript.com/forum/index.ph...wtopic=7241&hl=DaveF is developing a way to capture STDOUT and STDIN to grab this info as it processes. We have enough youth. How about a fountain of SMART? Share this post Link to post Share on other sites
layer 2 Posted January 13, 2005 what DaveF is working on... is that sort of like a packet sniffer? sinse it gets the info as it's being processed? FootbaG Share this post Link to post Share on other sites
Valik 478 Posted January 13, 2005 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. Share this post Link to post Share on other sites
layer 2 Posted January 13, 2005 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" ? FootbaG Share this post Link to post Share on other sites
Valik 478 Posted January 13, 2005 I think you need to learn what a packet is. Share this post Link to post Share on other sites
layer 2 Posted January 13, 2005 I think you need to learn what a packet is.<{POST_SNAPBACK}>rofl!! i knew i was some where a long the lines of no where on that guess FootbaG Share this post Link to post Share on other sites