spoon Posted February 24, 2013 Posted February 24, 2013 Hi guys, Here is my code that I have been using in most of my batch scripts to obtain default gateway and do simple if a equals b do c etc. for /f "tokens=2 delims=:" %%i in ('"ipconfig | findstr Gateway | findstr 10."') do set GW=%%i if "%GW%"==" 10.58.56.1" set SITECODE=BHR Does anyone have any idea on how to push these two lines into AutoIT? I have seen few topics talking about default gateway and how to get it but most scripts are 15+ lines which doesn't seem right. I would really appreciate some help. cheers, Adrian
Bert Posted February 24, 2013 Posted February 24, 2013 if the autoit code works, what difference does it make if it is 15 lines? a couple of milliseconds? not a big deal. Just use the examples you found and code it the AutoIt way. If you like the shortness of your batch way then just use RunDOS The Vollatran project My blog: http://www.vollysinterestingshit.com/
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