<?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=6190&amp;type=atom" />
	<updated>2011-09-08T02:07:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6190</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51302#p51302" />
			<content type="html"><![CDATA[<p>Потому что при удерживании пробела, клавиатура его повторяет. При каждом таком повторе срабатывает Ваша горячая клавиша. Так что в итоге, хотя цикл (из-за Return внутри) выполнялся только один раз, всё равно имеем повтор его кода до тех пор, пока удерживается пробел.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2011-09-08T02:07:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51302#p51302</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51300#p51300" />
			<content type="html"><![CDATA[<p>А почему оно работало и с Return внутри цикла?</p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-09-07T21:09:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51300#p51300</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51292#p51292" />
			<content type="html"><![CDATA[<p>Да, можно и через <a href="http://www.script-coding.com/AutoHotkey/SetKeyDelay.html">SetKeyDelay</a> — поставить его в начало скрипта.<br />Я, кстати, в своём примере Return по рассеянности в цикл всунул. Сейчас поправил код.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2011-09-07T13:57:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51292#p51292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51288#p51288" />
			<content type="html"><![CDATA[<p>Да, гениально, спасибо большое. Метод 2 из этой ссылки: <a href="http://www.autohotkey.com/docs/FAQ.htm#games">Why don&#039;t Hotstrings, Send, and MouseClick work in certain games?</a>.</p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-09-07T12:38:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51288#p51288</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51279#p51279" />
			<content type="html"><![CDATA[<p>Что за метод 2? По ссылке не нашёл его. В играх иногда помогает вставка паузы между нажатием и отпусканием.<br /></p><div class="codebox"><pre><code>$space::
while GetKeyState(&quot;Space&quot;,&quot;P&quot;)
{
Send, {Space Down}
Sleep, 50
Send, {Space Up}
Sleep 250
}
Return</code></pre></div><p>Но первым делом всегда нужно проверять, видит ли вообще скрипт Ваше нажатие. К примеру, звуковым сигналом.<br /></p><div class="codebox"><pre><code>$space::
    SoundBeep, 800, 500
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2011-09-07T04:01:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51279#p51279</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Проблема засыла клавиши в игре]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51271#p51271" />
			<content type="html"><![CDATA[<p>Скрипт должен посылать Space, пока Space нажат<br /></p><div class="codebox"><pre><code>$space::
while GetKeyState(&quot;Space&quot;,&quot;P&quot;)
{
SendPlay {Space}
   sleep 250
}</code></pre></div><p>SendPlay не помог. Не понимаю, как изменить код с помощью метода 2 из хелпа <a href="http://www.autohotkey.com/docs/commands/SendMode.htm">SendMode Play</a>. Помогите плиз.</p>]]></content>
			<author>
				<name><![CDATA[hohmuch]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27176</uri>
			</author>
			<updated>2011-09-06T20:01:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51271#p51271</id>
		</entry>
</feed>
