<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Произвольное срабатывание меток.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13077&amp;type=atom" />
	<updated>2017-10-11T14:47:47Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13077</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Произвольное срабатывание меток.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=119967#p119967" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
Gui, +HWNDmain_h
Gui, Add, Edit,w100 +HWNDE_1 ve1 gCalcResult,0
Gui, Add, Edit,w100 +HWNDE_2 ve2 gCalcResult,0
Gui, Add, Edit,w100 +HWNDE_3 ve3 gCalcResult,0
Gui, Show
return

CalcResult:
Gui, 1: Submit, NoHide
if (A_GuiControl == &quot;e1&quot;)
  return
if (!do3 and A_GuiControl == &quot;e2&quot;)
  do2=1
if (!do2 and A_GuiControl == &quot;e3&quot;)
  do3=1

if (do3 and A_GuiControl == &quot;e2&quot;)
{
  do3=
  return
}
if (do2 and A_GuiControl == &quot;e3&quot;)
{
  do2=
  return
}

if (A_GuiControl == &quot;e1&quot; || A_GuiControl == &quot;e2&quot;) {
  e3 := e1 * e2
  ControlSetText,,% e3,ahk_id%E_3%
 } else if (A_GuiControl == &quot;e1&quot; || A_GuiControl == &quot;e3&quot;) {
  e2 := e1 / e3
  ControlSetText,,% e2,ahk_id%E_2%
 }
return

GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-10-11T14:47:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=119967#p119967</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Произвольное срабатывание меток.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=119962#p119962" />
			<content type="html"><![CDATA[<p>Всем доброго здоровья!<br />Подскажите пожалуйста, как описать аналог примера ниже, чтобы изменение содержимого &quot;Edit&quot; телом подпрограммы происходило только от участия пользователя и не вызывало саму подпрограмму, изменениями, вызванными собственным участием.<br /></p><div class="codebox"><pre><code>
Gui, +HWNDmain_h
Gui, Add, Edit,w100 ve1 gCalcResult,0
Gui, Add, Edit,w100 ve2 gCalcResult,0
Gui, Add, Edit,w100 ve3 gCalcResult,0
Gui, Show
return
CalcResult:
	Gui, 1: Submit, NoHide
	if (A_GuiControl == &quot;e1&quot; || A_GuiControl == &quot;e2&quot; &amp;&amp; (e1 &gt; 0 &amp;&amp; e2 &gt; 0)) {
		e3 := e1 * e2
		ControlSetText,Edit3,% e3,ahk_id%main_h%
	} else if (A_GuiControl == &quot;e1&quot; || A_GuiControl == &quot;e3&quot; &amp;&amp; (e1 &gt; 0 &amp;&amp; e3 &gt; 0)) {
		e2 := e1 / e3
		ControlSetText,Edit2,% e2,ahk_id%main_h%
	}
return
GuiClose:
	ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2017-10-11T10:42:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=119962#p119962</id>
		</entry>
</feed>
