themax90 Posted January 12, 2005 Share 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 Link to comment Share on other sites More sharing options...
Bartokv Posted January 12, 2005 Share 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. Link to comment Share on other sites More sharing options...
themax90 Posted January 12, 2005 Author Share 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? Link to comment Share on other sites More sharing options...
sykes Posted January 13, 2005 Share 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? Link to comment Share on other sites More sharing options...
layer Posted January 13, 2005 Share 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 Link to comment Share on other sites More sharing options...
Valik Posted January 13, 2005 Share 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. Link to comment Share on other sites More sharing options...
layer Posted January 13, 2005 Share 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 Link to comment Share on other sites More sharing options...
Valik Posted January 13, 2005 Share Posted January 13, 2005 I think you need to learn what a packet is. Link to comment Share on other sites More sharing options...
layer Posted January 13, 2005 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now