<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK GUI: Как применить CheckBox?]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13958</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13958&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK GUI: Как применить CheckBox?».]]></description>
		<lastBuildDate>Sat, 21 Jul 2018 18:27:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127228#p127228</link>
			<description><![CDATA[<p>Спасибо, буду знать!</p>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Sat, 21 Jul 2018 18:27:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127228#p127228</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127227#p127227</link>
			<description><![CDATA[<div class="quotebox"><cite>DaGer пишет:</cite><blockquote><p>Мне нужно когда я активирую чекбокс я мог сам жать тот хоткей который мне нужен, а тут он все запускает подряд.</p></blockquote></div><p>Так в последнем коде тоже сразу все хоткеи активны.</p><p>Может так:<br /></p><div class="codebox"><pre><code>
#UseHook
Select := 0
Gui, Add, Text, vText1, qqqqq
Gui, Add, Text, x+5 vText2, wwwww 
Gui, Add, Text, x+5 vText3, eeeee
Gui, Add, CheckBox, x+5 gCheckBox vCheckBox
Gui, Show 
return

CheckBox: 
	GuiControl, -0x7, Text%Select%  ;	SS_BLACKFRAME
	If Select := Select &lt; 3 ? ++Select : 0
		GuiControl, , CheckBox, 1
	GuiControl, +0x7, Text%Select%  ;	SS_BLACKFRAME
	return
	
#If Select = 1
q:: SendInput, qqqqq 
#If Select = 2
w:: SendInput, wwwww 
#If Select = 3
e:: SendInput, eeeee 
#If
</code></pre></div><p>Или так:<br /></p><div class="codebox"><pre><code>
#UseHook 
Gui, Add, Radio, gCheck, qqqqq
Gui, Add, Radio, x+5 gCheck, wwwww 
Gui, Add, Radio, x+5 gCheck, eeeee
Gui, Add, Radio, x+5 Checked gCheck, off
Gui, Show 
return 

Check: 
	Select := A_GuiControl
	return
	
#If (Select = &quot;qqqqq&quot;)
q:: SendInput, qqqqq 
#If (Select = &quot;wwwww&quot;)
w:: SendInput, wwwww 
#If (Select = &quot;eeeee&quot;)
e:: SendInput, eeeee 
#If
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 21 Jul 2018 08:56:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127227#p127227</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127226#p127226</link>
			<description><![CDATA[<p><strong>powercat</strong><br />Именно то что мне нужно спасибо большое!!</p>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Sat, 21 Jul 2018 06:10:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127226#p127226</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127221#p127221</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Хорошо. как можно сделать правильно чтобы на одном чекбоксе было завязано 2,4 10 действий?</p></blockquote></div><div class="codebox"><pre><code>#NoEnv
SetBatchLines, -1

Gui, Add, Text, x12 y10 w100 h50 , qqqqq, wwwww, eeeee
Gui, Add, Checkbox, vval gfunc
Gui, Show, w161 h100, Untitled GUI

func()
{
	global
	Gui, Submit, NoHide
	if val = 0
		Hotkey(&quot;Off&quot;)
	else
		Hotkey(&quot;On&quot;)
     if GetKeyState(key0, &quot;P&quot;)
	{
		msgbox 1
	}
	if GetKeyState(key1, &quot;P&quot;)
	{
		msgbox 2
	}
	if GetKeyState(key2, &quot;P&quot;)
	{
		msgbox 3
	}
}

Hotkey(state)
{
	global
	key0 = *~$1
	Hotkey, %key0%, func, UseErrorLevel %state%
	StringReplace, key0, key0, *~$
	key1 = *~$2
	Hotkey, %key1%, func, UseErrorLevel %state%
	StringReplace, key1, key1, *~$
	key2 = *~$3
	Hotkey, %key2%, func, UseErrorLevel %state%
	StringReplace, key2, key2, *~$
}</code></pre></div><p>Поправил чуть-чуть.</p>]]></description>
			<author><![CDATA[null@example.com (powercat)]]></author>
			<pubDate>Fri, 20 Jul 2018 22:48:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127221#p127221</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127220#p127220</link>
			<description><![CDATA[<div class="codebox"><pre><code>Gui, 1: -SysMenu
Gui, 1:Add, CheckBox, w80 h40 gcb_action vcb_value, Тык
Gui, 1:Show
return

cb_action:
Gui, Submit, NoHide
Gui, 2: -SysMenu
Gui, 2:Add, Button, w120 h40 gaction1 , Первая кнопка
Gui, 2:Add, Button, w120 h40 gaction2 , Вторая кнопка
Gui, 2:Add, Button, w120 h40 gaction3 , Третья кнопка
Gui, 2:Show
return

; Выполнение первой кнопки 
action1: 
Gui, 2:Destroy
msgbox action1
return


; Выполнение второй кнопки 
action2:
Gui, 2:Destroy
msgbox action2
return

; Выполнение третьей кнопки 
action3:
Gui, 2:Destroy
msgbox action3
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (qqlexa)]]></author>
			<pubDate>Fri, 20 Jul 2018 22:16:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127220#p127220</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127219#p127219</link>
			<description><![CDATA[<p>Если не сложно пример можешь показать?</p>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Fri, 20 Jul 2018 21:46:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127219#p127219</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127216#p127216</link>
			<description><![CDATA[<p><strong>DaGer</strong>, а ты после нажатия на этот чекбокс создай ещё одно GUI где будет спрашивать что вы именно хотели. Там и выбрать. </p><div class="quotebox"><blockquote><p>хоткей который мне нужен</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (qqlexa)]]></author>
			<pubDate>Fri, 20 Jul 2018 21:38:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127216#p127216</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127211#p127211</link>
			<description><![CDATA[<p><strong>MandarinKa02</strong><br />Спасибо но<br />Мне нужно когда я активирую чекбокс я мог сам жать тот хоткей который мне нужен, а тут он все запускает подряд.</p>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Fri, 20 Jul 2018 16:30:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127211#p127211</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127202#p127202</link>
			<description><![CDATA[<div class="codebox"><pre><code>
...
Gui, Add, CheckBox, x120 y10 w10 h20 gcb_action vcb_value,0
...

cb_action:
GoSub, action1
GoSub, action2
msgbox cb_action
;...
;GoSub, action10
return

action1:
msgbox action1
return
action2:
msgbox action2
return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (MandarinKa02)]]></author>
			<pubDate>Fri, 20 Jul 2018 15:01:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127202#p127202</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127198#p127198</link>
			<description><![CDATA[<p>Хорошо. как можно сделать правильно чтобы на одном чекбоксе было завязано 2,4 10 действий?</p>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Fri, 20 Jul 2018 14:01:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127198#p127198</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127197#p127197</link>
			<description><![CDATA[<p>Код странный. Как это на одном чекбоксе 3 метки, 3 переменные?</p>]]></description>
			<author><![CDATA[null@example.com (qqlexa)]]></author>
			<pubDate>Fri, 20 Jul 2018 13:30:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127197#p127197</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127195#p127195</link>
			<description><![CDATA[<p>Помощь? что не правильно, как нибудь можно упростить все это ?<br /></p><div class="codebox"><pre><code>
Gui, Add, Text, x12 y10 w100 h50 , qqqqq, wwwww, eeeee
Gui, Add, CheckBox, x120 y10 w10 h20 gg1 gg2 gg3 vq vw ve, q w e
Gui, Show, w161 h100, Untitled GUI
return

g1:
Gui, Submit, NoHide
if q = 1
Hotkey, q, q, On
else
Hotkey, q, q, Off
return

g2:
Gui, Submit, NoHide
if w = 1
Hotkey, w, w, on
else
Hotkey, w, w, off
return

g3:
Gui, Submit, NoHide
if e = 1
Hotkey, e, e, on
else
Hotkey, e, e, off
return


q:
SendInput, qqqqq
return
w:
SendInput, wwwww
return
e:
SendInput, eeeee
return

GuiClose:
ExitApp
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Fri, 20 Jul 2018 13:26:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127195#p127195</guid>
		</item>
		<item>
			<title><![CDATA[AHK GUI: Как применить CheckBox?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127179#p127179</link>
			<description><![CDATA[<p>Как применить CheckBox На простое действие?</p><div class="codebox"><pre><code>
Gui, Add, Text, x12 y10 w100 h20 , qqqqq, wwwww, eeeee
Gui, Add, CheckBox, x120 y10 w10 h20 ,
Gui, Show, w161 h100, Untitled GUI
return

q:
SendInput, qqqqq
return
w:
SendInput, wwwww
return
e:
SendInput, eeeee
return
GuiClose:
ExitApp
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DaGer)]]></author>
			<pubDate>Fri, 20 Jul 2018 07:36:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127179#p127179</guid>
		</item>
	</channel>
</rss>
