<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: как отследить нажатие назначаемой в скрипте кнопки?]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=17881</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17881&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: как отследить нажатие назначаемой в скрипте кнопки?».]]></description>
		<lastBuildDate>Thu, 20 Jul 2023 14:21:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: как отследить нажатие назначаемой в скрипте кнопки?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158839#p158839</link>
			<description><![CDATA[<p>Все, отбой, понял, извините за флуд...</p>]]></description>
			<author><![CDATA[null@example.com (RacalCucumber)]]></author>
			<pubDate>Thu, 20 Jul 2023 14:21:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158839#p158839</guid>
		</item>
		<item>
			<title><![CDATA[AHK: как отследить нажатие назначаемой в скрипте кнопки?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158837#p158837</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (RacalCucumber)]]></author>
			<pubDate>Thu, 20 Jul 2023 14:07:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158837#p158837</guid>
		</item>
	</channel>
</rss>
