Mariah 0 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 Share this post Link to post Share on other sites
Xenobiologist 47 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 Share this post Link to post Share on other sites
Mariah 0 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 Share this post Link to post Share on other sites
targeter 0 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 Share this post Link to post Share on other sites
cobra11 0 Posted August 29, 2010 (edited) ... Edited December 6, 2017 by cobra11 Share this post Link to post Share on other sites
Mariah 0 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 Share this post Link to post Share on other sites
Mariah 0 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 Share this post Link to post Share on other sites