Kkweit Posted March 31, 2010 Posted March 31, 2010 Hi, Sorry to bother you with something which might seems to be so simple but i can't find a way to display de subnet mask of a computer. I tried different thing but none of them worked. Is there somebody who can help me ?
ProgAndy Posted March 31, 2010 Posted March 31, 2010 (edited) The subnet-mask is network-specific (one pc can have multiple adapters each in another network): http://www.autoitscript.com/forum/index.php?showtopic=95901&view=findpost&p=689749 Edited March 31, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Kkweit Posted March 31, 2010 Author Posted March 31, 2010 (edited) Thanks for your help. I'm sorry to say that but I'm real newbie with AutoIt and I don't know what part extract from your code to got it works ! Edited March 31, 2010 by Kkweit
ProgAndy Posted March 31, 2010 Posted March 31, 2010 You will need everything. The information you need is fetched between If Not @error Then (line 61) and ConsoleWrite($XML & @CRLF)(line 98) The subnet mask is fetched here: $XML &= _GetAllIPsXML(DllStructGetPtr($adapter, "IpAddressListNext"), "IP", False) To get a simple array with all IPs and subnetmasks, use $aIPs = _GetAllIps(DllStructGetPtr($adapter, "IpAddressListNext")) *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Kkweit Posted March 31, 2010 Author Posted March 31, 2010 (edited) I add those lines to your script $aIPs = _GetAllIps(DllStructGetPtr($adapter, "IpAddressListNext")) MsgBox(64,"Resultat du test permettant d'etablir un diagnostic de votre machine", & $aIPs) and i get the following message: Error:Variable used without being declared. This message is for the first one !( of the two lines) Edited March 31, 2010 by Kkweit
ProgAndy Posted March 31, 2010 Posted March 31, 2010 In the example, I added Opt("MustDeclareVars",1). So you have to declare all variables before you can assgn a value. (or remove that line) Also, $aIPs is an array, so your MsgBox wont't work, You can try _ArrayDisplay instead. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
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