Falcon1 Posted January 31, 2013 Posted January 31, 2013 Trying to extract the IP Address using IPCONFIG /ALL and Piping it to ipconfig.txt. RunWait(@Comspec & " /c ipconfig /all > " & "C:\utils\ipconfig.txt") How would I get the IP ADDRESS and then get the first three octets? Thank you for your help.
JohnOne Posted January 31, 2013 Posted January 31, 2013 (edited) There is some code which might get you started, but not from a file. Edited January 31, 2013 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
UEZ Posted January 31, 2013 Posted January 31, 2013 (edited) I would suggest to use WMI instead ipconfig because of different languages which cause different outputs and WMI is easier to use. You don't need to parse the text file. Further which ip address you want to get? On which interface? Have a look to the macros @IPAddress1 - @IPAddress4, too. Br, UEZ Edited January 31, 2013 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Moderators JLogan3o13 Posted February 1, 2013 Moderators Posted February 1, 2013 I would agree with UEZ, you should be able to do something simple without outputting to a file. This works for me: MsgBox(0, "", StringTrimRight(@IPAddress1, 4)) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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