ausssieautomate Posted December 28, 2008 Share Posted December 28, 2008 Hi Guys/Gals, I would like to record input and output from a console box like CMD or a Telnet session in Putty and then save that to txt file with a date and time. For example CMD: ping www.google.com -- output follows Any assistance would be much appreciated. Cheers. Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) Link to comment Share on other sites More sharing options...
Pain Posted December 28, 2008 Share Posted December 28, 2008 (edited) Something like this? $output = "" $test Run(@ComSpec & " /c " & "ping www.google.com", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $output &= StdoutRead($Std) If @error Then ExitLoop Wend MsgBox(0, "", $output) Edited December 28, 2008 by Pain Link to comment Share on other sites More sharing options...
ausssieautomate Posted December 28, 2008 Author Share Posted December 28, 2008 Something like this? $output = "" $test Run(@ComSpec & " /c " & "ping www.google.com", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $output &= StdoutRead($Std) If @error Then ExitLoop Wend MsgBox(0, "", $output) Looked into those commands, I mean something that can literally pull the data from a console box like Putty, CMD after a serials of commands have been run and save that to a file. In CMD you can right click on the box and go Edit -> "Select All" then copy a similar rule applies to Putty is there anyway to automate this process rather than just automating mouse clicks. Cheers Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing) 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