cramaboule Posted July 31, 2007 Share Posted July 31, 2007 (edited) Hello all,Instead of clicking serveral times to change my IP address on my laptop (as I have to do so sometimes) I created a small GUI that does that very easly ! (yes, I know I am lazy )Thanks martin for your helpI tested only in XP (not sure if it works in Vista)Based on netsh ! EDIT: Finnally the New version:- Modified the script due to the rename of some UDF- Fixed some small bugs- Make improvement !IMPORTANT you need #include <CompInfo.au3> for this script ! you can find it hereold version dowlloaded 189 timesIPset1.au3 Edited December 19, 2009 by cramaboule My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Stretch Posted July 31, 2007 Share Posted July 31, 2007 This is my version, with some help from ChrisL You have the same problem as me - Getting the name of the actual network card. My script is designed to run on 2 different types of touch screen computer - hence the keypad, but i have no way of getting the name of the card from windows. It also relies on the NetSh being in the same directory as the scrpit, as im not sure of the legality of fileinstalling it.SetIP.au3 Link to comment Share on other sites More sharing options...
SandelPerieanu Posted July 31, 2007 Share Posted July 31, 2007 this is my version. Link to comment Share on other sites More sharing options...
cramaboule Posted July 31, 2007 Author Share Posted July 31, 2007 this is my version.I've noticed that on some laptops the fonction getmac doesn't work at all !!! (and I've seen a number !!!)That' why I am carfull at using it !but nice one My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
cramaboule Posted July 31, 2007 Author Share Posted July 31, 2007 You have the same problem as me - Getting the name of the actual network card.Not at all,... look at my script about the MAC address !!! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
martin Posted July 31, 2007 Share Posted July 31, 2007 It's a good script. It is assumed that @IPAddress1 is the LAN and @IPAddress2 is WiFi but this is not correct. On my laptop it shows the WiFi address blank but in fact it should be the one shown for the LAN. Maybe you could use "netsh interface ip show config" to find this out, or perhaps "ipconfig" would be better. A useful extra feature would be for people (like me) with laptops who need to connect to different networks. So it would be good if you could save the settings, and load from a choice from a list say.. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
cramaboule Posted August 1, 2007 Author Share Posted August 1, 2007 It's a good script. It is assumed that @IPAddress1 is the LAN and @IPAddress2 is WiFi but this is not correct. On my laptop it shows the WiFi address blank but in fact it should be the one shown for the LAN. Maybe you could use "netsh interface ip show config" to find this out, or perhaps "ipconfig" would be better. A useful extra feature would be for people (like me) with laptops who need to connect to different networks. So it would be good if you could save the settings, and load from a choice from a list say.. Thanks martin. yeeeeee, I knoooooow, on my laptop when my LAN is not connected my @IPAddress1 become the Wi-Fi.(then display on the LAN side of my script!) I didn't find an easy way to correct it (until now) ipconfig /all is quite "long" or/and difficult. I didn't know about 'netsh interface ip show config', but I can try and even, take the name of the interface ! I'll try to make the change. One thing Autoit could improve would be this ! (showing the IP by interfaces ! @IPinterface1 for instance in an array ? @IPinterface1[1]=interface and @IPinterface1[2]=IP) About the profiles stuff,... look the one from 'psandu.ro' it is quite good ! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
microsoft Posted August 1, 2007 Share Posted August 1, 2007 it's a good Script. Link to comment Share on other sites More sharing options...
cramaboule Posted August 1, 2007 Author Share Posted August 1, 2007 it's a good Script. (!)A compliment from "microsoft",... I don't know if it is a compliment !!!!! (!) (!) (!) (!) (!) but thanks !!! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
Celeri Posted August 1, 2007 Share Posted August 1, 2007 I'll second that - good script! What would be nice however are some comments in your code so that users with less experience will be able to learn something Don't need to comment all the lines, just the lines that contain stuff that is not so evident. BTW, I've only seen one defective lan card that didn't show any MAC adress in my life. So any problems reading the MAC is either AutoIT based or Windows based. I've also checked the registry and although the main Lan card's MAC serves to brand your harddrives, the actual MAC never appears in the registry. So when you ask for it, Windows calls up the hardware every time. I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!) Link to comment Share on other sites More sharing options...
Creator Posted August 1, 2007 Share Posted August 1, 2007 Thanks martin. yeeeeee, I knoooooow, on my laptop when my LAN is not connected my @IPAddress1 become the Wi-Fi.(then display on the LAN side of my script!) I didn't find an easy way to correct it (until now) ipconfig /all is quite "long" or/and difficult. I didn't know about 'netsh interface ip show config', but I can try and even, take the name of the interface ! I'll try to make the change. One thing Autoit could improve would be this ! (showing the IP by interfaces ! @IPinterface1 for instance in an array ? @IPinterface1[1]=interface and @IPinterface1[2]=IP) About the profiles stuff,... look the one from 'psandu.ro' it is quite good ! There's no need to put the functionality in autoit since it has com support. Using WMI its easy to enumerate networkadapters. And JSthePatriot has written an excellent udf to do so -> http://www.autoitscript.com/forum/index.ph...amp;hl=compinfo Have fun! Link to comment Share on other sites More sharing options...
cramaboule Posted August 1, 2007 Author Share Posted August 1, 2007 @Celeri : I Know that it is not on the registry. I've searched for it already. I meant that the fonction getmac is NOT on ervey computer Lapotop. I made one script (link in my signature) to get the MAC address. The first version was based on getmac but was not able find it on the PC for whatever reason. That's why it is based on ipconfig/ all !@Creator : Cool Sooo great many thanks ! My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website Link to comment Share on other sites More sharing options...
ScriptLearner Posted August 10, 2007 Share Posted August 10, 2007 Would This Set An Ip For Games?Thanks-Script-Leaner® Edited SWBMy Virst Script,UslessAnOther Sample Link to comment Share on other sites More sharing options...
Dirk98 Posted September 8, 2007 Share Posted September 8, 2007 Hello all,Instead of clicking serveral times to change my IP address on my laptop (as I have to do so sometimes) I created a small GUI that does that very easly ! (yes, I know I am lazy )Thanks martin for your helpI tested only in XP (not sure if it works in Vista) and it works only for english and frensh OS !(you can add you language by yourself just look at the end of the script)Based on netsh ! cramaboule, your script works ok on my PC with launguage OS (WinXP Pro SP2). You'll be laughing (I'm a newbie), but all I want is just to add my desired IP address, Subnet and Gateway to the end of your script to automate the change of my PC's current IP in one click. Could you please give me a pointer which command to use? I've tried ControlSend, but it doesn't work to some reason.Many thanks. 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