<?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=5483&amp;type=atom" />
	<updated>2011-02-07T17:15:10Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5483</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сравнивание результатов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=44962#p44962" />
			<content type="html"><![CDATA[<p>Спасибо большое, работает <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Monterrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26559</uri>
			</author>
			<updated>2011-02-07T17:15:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=44962#p44962</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сравнивание результатов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=44957#p44957" />
			<content type="html"><![CDATA[<p>Первый параметр IF всегда считается переменной, второй параметр зависит от вида записи.<br />Если использовать обычную запись без скобок, то второй параметр считается переменной, только если стоят знаки %.<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x10 y140 w60 Limit4 Number vSN1
Gui, Add, Button, x10 y170, Check
Gui, Show, w400 h250
Return

ButtonCheck:
Gui, Submit, NoHide
If SN1=%A_YYYY%
{
MsgBox
}
Return</code></pre></div><p>Если же используется выражение, т.е. после If идет запись в скобках, то второй параметр считается переменной и знаков % не требует.</p><div class="codebox"><pre><code>Gui, Add, Edit, x10 y140 w60 Limit4 Number vSN1
Gui, Add, Button, x10 y170, Check
Gui, Show, w400 h250
Return

ButtonCheck:
Gui, Submit, NoHide
If (SN1=A_YYYY)
{
MsgBox
}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2011-02-07T17:04:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=44957#p44957</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Сравнивание результатов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=44955#p44955" />
			<content type="html"><![CDATA[<p>Создал поле Edit в GUI<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x10 y140 w60 Limit4 Number vSN1
Gui, Add, Button, x10 y170, Check
Gui, Show, w400 h250
Return</code></pre></div><p>Тут вроде правильно. Далее нужно было сопоставить его с текущим годом<br /></p><div class="codebox"><pre><code>ButtonCheck:
Gui, Submit, NoHide
If %SN1%=%A_YYYY%
{
...
}
Return</code></pre></div><p>Почему то ничего того, что написано в {} не происходит. Я проверял через ListVars (между &quot;Gui, Submit&quot; и &quot;if...&quot;, всё правильно, выводит значения переменной СН1 - год, значит присвоение прошло нормально. Но сравнить не может или сравнивает как то не так.:( Помогите пожалуйста решить данную проблему.</p><p>Заранее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Monterrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26559</uri>
			</author>
			<updated>2011-02-07T16:57:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=44955#p44955</id>
		</entry>
</feed>
