<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Переключатель с помощью Button]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13699</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13699&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Переключатель с помощью Button».]]></description>
		<lastBuildDate>Thu, 10 May 2018 17:05:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125285#p125285</link>
			<description><![CDATA[<p>Еще нашел одно решение по своему вопросу.</p><div class="codebox"><pre><code>Gui, Add, Button, w100 h100, Start
Gui, Show, w200 h200, Test
Return

ButtonStart:
GuiControlGet, OutputVar,, Button1
If OutputVar = Start
  GuiControl, Text, Button1, Stop
Else
  GuiControl, Text, Button1, Start
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Thu, 10 May 2018 17:05:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125285#p125285</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125280#p125280</link>
			<description><![CDATA[<p>То, что нужно. Спасибо огромное.</p>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Thu, 10 May 2018 14:54:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125280#p125280</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125278#p125278</link>
			<description><![CDATA[<div class="codebox"><pre><code>
singleinstance, force
btnlbl := 0                                ;starts in off position; change to 1 to start in on position
gui, add, button, gtest vtest, % btnlbl?&quot;on&quot;:&quot;off&quot;
gui,show, w200 h200
return

test:
btnlbl := !btnlbl
guicontrol, ,test, % btnlbl?&quot;on&quot;:&quot;off&quot;
if btnlbl
	msgbox Do &quot;on&quot; Stuff
else
	msgbox Do &quot;off&quot; Stuff
return
</code></pre></div><p><a href="https://autohotkey.com/board/topic/107603-gui-button-working-as-toggle/">https://autohotkey.com/board/topic/1076 … as-toggle/</a></p>]]></description>
			<author><![CDATA[null@example.com (red2881)]]></author>
			<pubDate>Thu, 10 May 2018 14:50:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125278#p125278</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125276#p125276</link>
			<description><![CDATA[<p>Спасибо, что ответили <strong>red2881</strong>, но я спрашивал про саму конструкцию в Gui как это реализовать. Чтоб была только одна кнопка с начальной позицией СТАРТ и при нажатии на нее была кнопка с надписью СТОП.</p>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Thu, 10 May 2018 14:40:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125276#p125276</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125275#p125275</link>
			<description><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=8541"> AHK: Включение/выключение цикла на одну кнопку.</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=1205"> AHK: Многодельность клавиши</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=8062"> AHK: два действия на одну клавишу</a></p>]]></description>
			<author><![CDATA[null@example.com (red2881)]]></author>
			<pubDate>Thu, 10 May 2018 14:32:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125275#p125275</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Переключатель с помощью Button]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125274#p125274</link>
			<description><![CDATA[<p>Всем доброго времени суток. Поправьте меня, если неправильно назвал тему.<br />Можно сделать, чтоб управлялось одной кнопкой?</p><p>Составил скрипт, чтоб Вы поняли, чего именно я хочу добиться.</p><div class="codebox"><pre><code>Start = Старт
Stop = Остановлен
Disabled1 =
Disabled2 = +Disabled
restart:
Gui Add, Button, x39 y68 w80 h61 %Disabled1% gButton1, %Start%
Gui Add, Button, x150 y68 w80 h61 %Disabled2% gButton2, %Stop%
Gui Show, w270 h191, Window
Return 

Button1:
Start = Запущен
Stop = Стоп
Disabled1 = +Disabled
Disabled2 =
Gui, Destroy
Goto, restart
return

Button2:
Start = Старт
Stop = Остановлен
Disabled1 =
Disabled2 = +Disabled
Gui, Destroy
Goto, restart
return

GuiEscape:
GuiClose:
    ExitApp</code></pre></div><p>Сейчас две кнопки. Но как сделать, чтоб все это управлялось одной? Ну и соответственно со сменой текста внутри кнопки.<br />Читал справку по GuiControlGet и если я правильно понял, это тут не сработает.</p>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Thu, 10 May 2018 13:59:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125274#p125274</guid>
		</item>
	</channel>
</rss>
