<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Подключение к интернету (Wi-Fi)]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14848</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14848&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Подключение к интернету (Wi-Fi)».]]></description>
		<lastBuildDate>Sat, 06 Jul 2019 20:32:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Подключение к интернету (Wi-Fi)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134787#p134787</link>
			<description><![CDATA[<p>У меня такой скрипт сам определяет название подключения, если оно единственное wi-fi. Должен быть запущен от администратора.<br /></p><div class="codebox"><pre><code>$F10:: ToggleWiFi()

ToggleWiFi()  {
   wmi := ComObjGet(&quot;winmgmts:&quot;)
   for adapter in wmi.ExecQuery(&quot;Select * from Win32_NetworkAdapter&quot;)
      if InStr(adapter.name, &quot;wireless&quot;) &amp;&amp; (interfaceName := adapter.NetConnectionID) &amp;&amp; status := adapter.NetConnectionStatus
         break
      
   if (interfaceName = &quot;&quot; || status = &quot;&quot;)  {
      MsgBox, Failed to get interfaceName!
      return
   }
   if status not in 0,2   ; Disconnected = 0, Connected = 2
   {
      Loop  {
         Sleep, 500
         for adapter in wmi.ExecQuery(&quot;Select * from Win32_NetworkAdapter Where Index=&quot; . adapter.Index)
            status := adapter.NetConnectionStatus
      } until status = 0 || status = 2 || (A_Index = 20 &amp;&amp; failed := true)
      if failed  {
         MsgBox, Failed to get the status!
         return
      }
   }
   Run, % (A_IsAdmin ? &quot;&quot; : &quot;*RunAs &quot;) . &quot;netsh.exe interface set interface name=&quot;&quot;&quot;
                                       . interfaceName . &quot;&quot;&quot; admin=&quot;
                                       . (status = 0 ? &quot;en&quot; : &quot;dis&quot;) . &quot;abled&quot;,, Hide
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 06 Jul 2019 20:32:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134787#p134787</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подключение к интернету (Wi-Fi)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134785#p134785</link>
			<description><![CDATA[<p>Пользуйтесь поиском.<br /><a href="http://forum.script-coding.com/viewtopic.php?id=5201">AHK: подключение/отключение интернета</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=7985">AHK: Настройки сетевого адаптера</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=8812">AHK: Управлением сетевым адаптером</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=11774">AHK: Отключение интернета.</a></p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Sat, 06 Jul 2019 16:56:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134785#p134785</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Подключение к интернету (Wi-Fi)]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134784#p134784</link>
			<description><![CDATA[<p>Всем привет! <br />Подскажите пожалуйста код, чтобы сделать горячую клавишу, отключить/включить доступ к интернету (Беспроводное сетевое соединение).</p>]]></description>
			<author><![CDATA[null@example.com (tregalka)]]></author>
			<pubDate>Sat, 06 Jul 2019 15:45:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134784#p134784</guid>
		</item>
	</channel>
</rss>
