Mariah Posted August 26, 2010 Share Posted August 26, 2010 Hi everyone, im new to this forum however still hope to get some help here. I'm looking to make this work: http://www.autoitscript.com/forum/index.php?showtopic=118205 Currently that checks if LAN and WLAN are "ENABLED" then it will disable the WLAN. You can also find the script in the attachment. I WANT if the user is "CONNECTED" to LAN AND WLAN then disable the WLAN Please help!!script2.au3 Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 26, 2010 Share Posted August 26, 2010 Should it work on every PC, or just on your own? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Mariah Posted August 29, 2010 Author Share Posted August 29, 2010 Should it work on every PC, or just on your own?on every pc I just need a simple Condition to check if Local Area Connection and Wireless Area network both are connected to the network.example: if ( (local area connection = connected) AND (wireless area network = connected) ) { msgbox("you rock"); }hehe please help me! i will pray for you Link to comment Share on other sites More sharing options...
targeter Posted August 29, 2010 Share Posted August 29, 2010 (edited) You need an if statement on this AdapterTypeID and NetConnectionStatus with the win32_networkadapterclass. Have you tried to code this? It just seems like you want us to write the if statement for you. NetConnectionStatus =2 means connected. That post you linked to is almost all setup for you. http://msdn.microsoft.com/en-us/library/aa394216%28v=VS.85%29.aspx http://www.autoitscript.com/forum/index.php?showtopic=118205 Edited August 29, 2010 by targeter Link to comment Share on other sites More sharing options...
cobra11 Posted August 29, 2010 Share Posted August 29, 2010 (edited) ... Edited December 6, 2017 by cobra11 Link to comment Share on other sites More sharing options...
Mariah Posted August 31, 2010 Author Share Posted August 31, 2010 You need an if statement on this AdapterTypeID and NetConnectionStatus with the win32_networkadapterclass. Have you tried to code this? It just seems like you want us to write the if statement for you.NetConnectionStatus =2 means connected.That post you linked to is almost all setup for you.http://msdn.microsoft.com/en-us/library/aa394216%28v=VS.85%29.aspxhttp://www.autoitscript.com/forum/index.php?showtopic=118205thanks targeter!! tell me why r u so smart heheheh thanks again Link to comment Share on other sites More sharing options...
Mariah Posted August 31, 2010 Author Share Posted August 31, 2010 for test internet connection use: InternetTest() If $InternetStat = 1 Then MsgBox(16, "Error", "You aren' t connect to internet, the program will be closed") Exit EndIf Func InternetTest() $InternetStat = 0 $RetVal = Ping("www.google.it", 2000) ;put siteweb that you want If $RetVal Then Return EndIf $InternetStat = 1 Return EndFunc this wasn't what i was looking for.. thanks any way 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