<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15792&amp;type=atom" />
	<updated>2020-11-03T13:39:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15792</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143108#p143108" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong> То, что без Gui, этот мод можно не указывать. Т.е. оно работает так как надо. Как я должен был связать этот мод с наличием Gui ?</p>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2020-11-03T13:39:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143108#p143108</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143107#p143107" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Справка пишет:</cite><blockquote><p>P: Определяется физическое состояние <strong>(т.е. держит ли пользователь клавишу нажатой на самом деле)</strong>.</p></blockquote></div><p>Что тут можно не понять?&nbsp; <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-11-03T13:15:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143107#p143107</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143106#p143106" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong> Спасибо за правильное решение. Я даже со справкой не понял, про мод &quot;T&quot; и &quot;P&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2020-11-03T13:13:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143106#p143106</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143105#p143105" />
			<content type="html"><![CDATA[<p>Не знаю почему, но вот решение.<br /></p><div class="codebox"><pre><code>#NoEnv
CoordMode, mouse

Gui, New, , test
Gui, Show, w500 h500

^1::

TH := 2
while (GetKeyState(&quot;Control&quot;,&quot;P&quot;) &amp;&amp; GetKeyState(&quot;1&quot;,&quot;P&quot;))
{
MouseGetPos, x, y
x:=Round(x)
y:=Round(y)
sleep, 500
}

msgbox, %x% %y%

return

</code></pre></div><br /><br /><p>UPD:<br /><a href="http://www.script-coding.com/AutoHotkey/GetKeyState.html">GetKeyState</a></p><div class="quotebox"><cite>Справка пишет:</cite><blockquote><p>Если этот параметр опущен, будет определяться логическое состояние клавиши. Это состояние, в котором клавиша находится по мнению операционной системы и активного окна, но оно не обязательно совпадает с физическим состоянием.</p></blockquote></div><p>Сначала делаем, потом инструкции читаем... все как обычно. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2020-11-03T13:08:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143105#p143105</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: В активном Gui, не видит переменных объявленных в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143101#p143101" />
			<content type="html"><![CDATA[<p>Первый раз столкнулся с таким: в активном окне GUI &quot;test&quot;, скрипт не будет воспринимать переменные объявленные в цикле. Если сменить окно, то будет. В чем проблема ?</p><div class="codebox"><pre><code>
#NoEnv 
CoordMode, mouse

Gui, New, , test
Gui, Show, w500 h500

^1::

TH := 2 
while (GetKeyState(&quot;Control&quot;) &amp;&amp; GetKeyState(&quot;1&quot;))
{
MouseGetPos, x, y
x:=Round(x)
y:=Round(y)
sleep, 500
}
	
msgbox, %x% %y%

return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2020-11-03T11:42:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143101#p143101</id>
		</entry>
</feed>
