<?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=17881&amp;type=atom" />
	<updated>2023-07-20T14:21:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17881</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: как отследить нажатие назначаемой в скрипте кнопки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158839#p158839" />
			<content type="html"><![CDATA[<p>Все, отбой, понял, извините за флуд...</p>]]></content>
			<author>
				<name><![CDATA[RacalCucumber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41299</uri>
			</author>
			<updated>2023-07-20T14:21:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158839#p158839</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: как отследить нажатие назначаемой в скрипте кнопки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158837#p158837" />
			<content type="html"><![CDATA[<p>Есть следующий код:</p><div class="codebox"><pre><code>
		Loop 
		{
			Sleep, 10
			if GetKeyState(&quot;LButton&quot;, &quot;P&quot;)
			{
				Sleep, 500
				Send {LShift}
				break
			}
&gt;&gt;&gt;			If GetKeyState(&quot;s&quot;, &quot;P&quot;)
			{
				Send {Alt}
				break
			}	
return
</code></pre></div><p>Когда кнопка в строчке, отмеченная &gt;&gt;&gt; указывается в строке прямо - все работает. А как вместо нее использовать произвольную кнопку, назначаемую пользователем, чье значение хранится в %VAR%? </p><p>Варианты типа If GetKeyState(%VAR%, &quot;P&quot;) или GetKeyState(&quot;%VAR%&quot;, &quot;P&quot;) или GetKeyState(&quot; %VAR% &quot;, &quot;P&quot;) или GetKeyState(VAR, &quot;P&quot;) не работают... Или делать подпрограмму, тупо перебирающую все допустимые комбинации кнопок и для каждой прописывать свою строчку GetKeyState(&lt;название клавиши&gt;, &quot;P&quot;)?</p>]]></content>
			<author>
				<name><![CDATA[RacalCucumber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41299</uri>
			</author>
			<updated>2023-07-20T14:07:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158837#p158837</id>
		</entry>
</feed>
