<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK:Checkbox Disable\Enable]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13983&amp;type=atom" />
	<updated>2018-07-27T03:42:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13983</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127453#p127453" />
			<content type="html"><![CDATA[<p>А ещё проще так:<br /></p><div class="codebox"><pre><code>Gui,Add,Radio, x10 y10 vRad gSubmit , 35`%
Gui,Add,Radio, x30 y30 gSubmit , 30`%
Gui,Add,Radio, x50 y50 gSubmit , 10`%
Gui,Show,Center w250 h250
Return

Submit:
   Gui, Submit, NoHide
   ToolTip, % Rad, 0, 0, 1
   Return
   
GuiClose:
   ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-27T03:42:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127453#p127453</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127452#p127452" />
			<content type="html"><![CDATA[<p>Спасибо большое то что нужно <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-27T03:33:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127452#p127452</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127451#p127451" />
			<content type="html"><![CDATA[<p>Ясно, как-то так:<br /></p><div class="codebox"><pre><code>Gui,Add,Checkbox, x10 y10 vRad1 gSubmit , 35`%
Gui,Add,Checkbox, x30 y30 vRad2 gSubmit , 30`%
Gui,Add,Checkbox, x50 y50 vRad3 gSubmit , 10`%
Gui,Show,Center w250 h250
return

Submit:
   toggle := !toggle
   Gui, Submit, NoHide
   Loop 3  {
      if (toggle &amp;&amp; !Rad%A_Index%)
         GuiControl, Disable, Rad%A_Index%
      if !toggle
         GuiControl, Enable, Rad%A_Index%
   }
   Return
   
GuiClose:
   ExitApp</code></pre></div><p>Но вообще если можно выбрать другой чекбокс, сняв выбранный ранее, то какой смысл в их отключении? Проще сделать переключение:<br /></p><div class="codebox"><pre><code>Gui,Add,Checkbox, x10 y10 vRad1 gSubmit , 35`%
Gui,Add,Checkbox, x30 y30 vRad2 gSubmit , 30`%
Gui,Add,Checkbox, x50 y50 vRad3 gSubmit , 10`%
Gui,Show,Center w250 h250
return

Submit:
   Gui, Submit, NoHide
   Loop 3
      if !(Rad%A_Index% &amp;&amp; A_GuiControl = &quot;Rad&quot; . A_Index)
         GuiControl,, Rad%A_Index%, 0
   Return
   
GuiClose:
   ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-27T03:29:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127451#p127451</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127450#p127450" />
			<content type="html"><![CDATA[<p>Если я выбрал 1 чекбокс, другие отключались что бы их нельзя было выбирать.Тыкань по ним.<br />Насчёт Enable если я выбрал не правильный чекбокс то что бы после uncheck включались другие,для возможности выбора их.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-27T03:13:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127450#p127450</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127449#p127449" />
			<content type="html"><![CDATA[<p>Не уверен, что вас понял. Если нужно, чтобы они &quot;отключались&quot;, зачем вы используете команду <em>Enable</em>? Что вы понимаете под &quot;отключением&quot;?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-27T03:08:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127449#p127449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Checkbox Disable\Enable]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127448#p127448" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />Подскажите где я ошибся и как это исправить.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>

#SingleInstance force

Gui,Add,Checkbox, x10 y10 vRad1 gSubmit , 35`%
Gui,Add,Checkbox, x30 y30 vRad2 gSubmit , 30`%
Gui,Add,Checkbox, x50 y50 vRad3 gSubmit , 10`%
Gui,Show,Center w250 h250
return


Submit:
Gui,Submit,NoHide

If (Rad2= 1)
{
    GuiControl , Disable, Rad1
    GuiControl , Disable, Rad3
}
else
{
	GuiControl , Enable, Rad1
    GuiControl , Enable, Rad3
}

If (Rad1= 1)
{
    GuiControl , Disable, Rad2
    GuiControl , Disable, Rad3
}
else
{
	GuiControl , Enable, Rad2
    GuiControl , Enable, Rad3
}

If (Rad3= 1)
{
    GuiControl , Disable, Rad1
    GuiControl , Disable, Rad2
}
else
{
	GuiControl , Enable, Rad1
    GuiControl , Enable, Rad2
}


return

GuiClose:
ExitApp

</code></pre></div></div></div><p>Нужно чтобы при Выборе одного из Чекбоксов все остальные отключались.</p>]]></content>
			<author>
				<name><![CDATA[RedBishep]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38892</uri>
			</author>
			<updated>2018-07-27T02:54:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127448#p127448</id>
		</entry>
</feed>
