<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Зажатие кнопки]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=15261&amp;type=atom" />
	<updated>2020-03-29T17:48:27Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=15261</id>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138672#p138672" />
			<content type="html"><![CDATA[<p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T17:48:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138672#p138672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138671#p138671" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Murka пишет:</cite><blockquote><p>Я правильно написал?</p></blockquote></div><p>Нет, усложнили.<br /></p><div class="codebox"><pre><code>*$z::
for k, v in bga := [[&quot;h&quot;, 100], [&quot;e&quot;, 250], [&quot;l&quot;, 500], [&quot;l&quot;, 750], [&quot;o&quot;, 1000]] {
	SendInput, % &quot;{&quot; . v[1] . &quot;}&quot;
	Sleep, v[2]
} until !GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
return</code></pre></div><p>Три точки не нужны, я просто показал, что можно продолжить.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-29T17:38:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138671#p138671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138670#p138670" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>У меня ещё вопрос, зачем нужны точки внутри фигурных скобок?</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T17:17:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138670#p138670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138669#p138669" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>Я правильно написал?</p><div class="codebox"><pre><code>
*$z::
for k, v in bga := [[&quot;h&quot;, 100], [&quot;e&quot;, 250], [&quot;l&quot;, 500], [&quot;l&quot;, 750], [&quot;o&quot;, 1000]] {
	;MsgBox, % bga[k, 2]
	SendInput, % &quot;{&quot; . bga[k, 1] . &quot;}&quot;
	Sleep, % bga[k, 2]
} until !GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T17:16:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138669#p138669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138666#p138666" />
			<content type="html"><![CDATA[<p>В данном случае v — это массив вида [&quot;h&quot;, 100], соответственно к его элементам нужно обращаться по индексам, 1 и 2.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-29T16:38:21Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138666#p138666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138665#p138665" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>Не могу понять в чем проблема. При нажатии на клавишу ничего не происходит.</p><div class="codebox"><pre><code>
*$z::
for k, v in [[&quot;h&quot;, 100], [&quot;e&quot;, 250], [&quot;l&quot;, 500], [&quot;l&quot;, 750], [&quot;o&quot;, 1000]] {
   SendInput, % &quot;{&quot; . v . &quot;}&quot;
   Sleep, % v
} until !GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T16:31:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138665#p138665</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138659#p138659" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>.</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T15:41:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138659#p138659</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138656#p138656" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>for k, v in [[&quot;F5&quot;, 100], [&quot;F6&quot;, 250], [&quot;5&quot;, 300] ...] </code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-29T15:34:06Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138656#p138656</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138655#p138655" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p><p>А что если задержка будет всё время разной? 100, 250, 300</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T15:25:00Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138655#p138655</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138652#p138652" />
			<content type="html"><![CDATA[<p>Эх, <strong>Murka</strong>...<br /></p><div class="codebox"><pre><code>*$z::
for k, v in [&quot;F5&quot;, &quot;F6&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;9&quot;, &quot;0&quot;, &quot;Tab 2&quot;] {
   SendInput, % &quot;{&quot; . v . &quot;}&quot;
   Sleep, 300
} until !GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-03-29T14:42:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138652#p138652</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138651#p138651" />
			<content type="html"><![CDATA[<p><strong>GOSPODBOGTROICA</strong></p><p>Я пытался сделать код более компактным, но не получилось.<br /></p><div class="codebox"><pre><code>
#SingleInstance, Force

*$z::
While GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
{
SendInput, {f5}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {f6}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {5}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {6}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {7}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {9}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {0}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
SendInput, {Tab 2}
sleep, 300
If GetKeyState(&quot;vk5A&quot;, &quot;P&quot;) = 0
	break
}
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-29T13:50:36Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138651#p138651</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138634#p138634" />
			<content type="html"><![CDATA[<p><strong>Murka</strong> мне для доты 2, скрипт просто прокликивает все, а нужные способности могут не прожаться а он может выбрать другую цель, через процесс игры он не сможет проверять ?</p><p>А Скрипт можно остановить в тот момент когда отпускаешь кнопку, чтобы он до конца не тыкал и не ждал?<br /></p><div class="codebox"><pre><code>
*$z::
While GetKeyState(&quot;vk5A&quot;, &quot;P&quot;)
{
Sendinput, {f5}
sleep, 		
Sendinput, {f6}
sleep, 300
Sendinput, {5}
sleep, 300
Sendinput, {6}
sleep, 300
Sendinput, {7}
sleep, 300
Sendinput, {9}
sleep, 300
Sendinput, {0}
sleep, 300
Sendinput, {tab}{tab}
sleep, 300
}
return
</code></pre></div><p>Вообще желательно чтобы, он как то мог проверить выполнилось ли дейстиве или нет, а те каторые выполнились чтобы не повторялись, выполнялись только те каторые не выполнились, пока нажата кнопка, sleep, вообще поидее не нужна, просто действия перескакивают или не выполняются, приходиться зажимать кнопку, чтобы они по новой нажались, какие то кнопки прожались, отпускаю кнопку, скрипт до конца выполняется, можно остановить в тот момент когда отпускаю?</p>]]></content>
			<author>
				<name><![CDATA[GOSPODBOGTROICA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40707</uri>
			</author>
			<updated>2020-03-28T18:37:05Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138634#p138634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138633#p138633" />
			<content type="html"><![CDATA[<p><strong>GOSPODBOGTROICA</strong></p><p>Для какой игры вам нужен этот скрипт?</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-28T18:12:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138633#p138633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138632#p138632" />
			<content type="html"><![CDATA[<p><strong>GOSPODBOGTROICA</strong></p><p>http://www.script-coding.com/AutoHotkey/Hotkeys.html Ну вот вам справочка. Там говорится про эти *, $ символы.</p>]]></content>
			<author>
				<name><![CDATA[Murka]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39392</uri>
			</author>
			<updated>2020-03-28T18:11:06Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138632#p138632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Зажатие кнопки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=138631#p138631" />
			<content type="html"><![CDATA[<p><strong>Murka</strong><br />Спасибо все четко работает, а можно расшифровать *$z, обязательно так писать или можно просто z или &quot;vk5A&quot; или &quot;sc2C&quot; , и не подскажете чтобы только в определенном процессе работало? что прописать, и еще вопрос ahk может прочитать в игре нажалась ли кнопка или нет? ну в скрипте например она сработала а в игре может не сработала она может проверить?<br />Или проверить была ли нажата в игре кнопка, и не нажимать её, или новую ветку надо создавать на другой вопрос уже, заранее извиняюсь.</p>]]></content>
			<author>
				<name><![CDATA[GOSPODBOGTROICA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40707</uri>
			</author>
			<updated>2020-03-28T17:15:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=138631#p138631</id>
		</entry>
</feed>
