blakel Posted November 9, 2005 Share Posted November 9, 2005 (edited) What I would like to do is capture output from a command line program. in bash it would be msg=$(command opts) I know this has been discussed before in this forum, but maybe there is an update. I was thinking about writing to a file command > tmp.txt. Or I could set an enviroment variable, but I am not sure how to pipe into set and it would be easier to read the file in autoit than redirect the input. There was a listing about reading output in a beta version, but I am afraid of that going to all my workstations. Any thoughts? Edited November 9, 2005 by blakel Link to comment Share on other sites More sharing options...
themax90 Posted November 9, 2005 Share Posted November 9, 2005 http://www.autoitscript.com/forum/index.php?showtopic=17720 Link to comment Share on other sites More sharing options...
blakel Posted November 9, 2005 Author Share Posted November 9, 2005 Thank you for the reply. That is the topic I read, but for this purpose, I do not want to use beta. I have found a way to pipe into set using the for command. Here is an example for the ipaddress, which I know is a macro. for /F "tokens=15" %%T IN ('ipconfig /all ^| find /i ^"ip address^"') DO set IPADDRESS1=%%T also note that this does not deal with multiple ip addresses. If you have any thing better, let me know. 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