<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Запуск Hotkey с помощью Send]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=12542</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12542&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Запуск Hotkey с помощью Send».]]></description>
		<lastBuildDate>Mon, 13 Mar 2017 01:25:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113812#p113812</link>
			<description><![CDATA[<p>Я проверял так:<br /></p><div class="codebox"><pre><code>ListHotkeys
pause
enter::
vkD::
space::
#if 1
a::
#if</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 13 Mar 2017 01:25:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113812#p113812</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113811#p113811</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>Просто при ремаппинге энтера или использовании директивы #if включается клавиатурный хук.</p></blockquote></div><p> Думал об этом, но не нашёл, где это сказано явно.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 12 Mar 2017 22:57:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113811#p113811</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113805#p113805</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Получается с If отваливается реакция на нефизический посыл клавиш.</p></blockquote></div><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Тут вопрос, скорее, почему Space срабатывает.<br />Такой пример вызывает срабатывание:<br /></p><div class="codebox"><pre><code>Send {Space}
Space:: MsgBox, % A_ThisHotkey</code></pre></div><p>А такой нет:<br /></p><div class="codebox"><pre><code>Send {Enter}
Enter:: MsgBox, % A_ThisHotkey</code></pre></div></blockquote></div><p>Просто при ремаппинге энтера или использовании директивы #if включается клавиатурный хук.<br />А с ним надо указывать SendLevel:<br /></p><div class="quotebox"><blockquote><p>By default, <strong>hook hotkeys</strong> and hotstrings ignore keyboard and mouse events generated by any AutoHotkey script</p></blockquote></div><p><a href="https://autohotkey.com/docs/commands/SendLevel.htm">https://autohotkey.com/docs/commands/SendLevel.htm</a><br />Так работает:<br /></p><div class="codebox"><pre><code>SendLevel 1
Send {Enter}
Enter:: MsgBox, % A_ThisHotkey</code></pre></div><p>Либо можно заменить enter на vk, тем самым отключить использование клавиатурного хука:<br /></p><div class="codebox"><pre><code>Send {Enter}
vkD:: MsgBox, % A_ThisHotkey</code></pre></div><div class="quotebox"><blockquote><p>Specify for nn the hexadecimal virtual key code of a key. This rarely-used method also <strong>prevents certain types of hotkeys from requiring the keyboard hook</strong>.</p></blockquote></div><p><a href="https://autohotkey.com/docs/KeyList.htm">https://autohotkey.com/docs/KeyList.htm</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sun, 12 Mar 2017 20:59:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113805#p113805</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113793#p113793</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Но с InputLevel не принимаются посылы по таймеру.</p></blockquote></div><p>#InputLevel — это, как я понял, директива только для горячих клавиш.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:45:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113793#p113793</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113792#p113792</link>
			<description><![CDATA[<p>Принимающий:<br /></p><div class="codebox"><pre><code>
#If 1
#If

Hotkey, If, 1
Hotkey, Enter, MyLabel    
Hotkey, If    
Return

MyLabel:
	MsgBox, , , %A_ThisHotkey%, 0.1
	Return 
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:44:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113792#p113792</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113791#p113791</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>SendLevel влияет на отправку из текущей ветки, #InputLervel — из всего скрипта.</p></blockquote></div><p>Тогда получается что эти два кода должны работать идентично?<br /></p><div class="codebox"><pre><code>
SetTimer, Send, 1000

1::
Send:
	SendLevel, 1
	Send {Enter}
	return
</code></pre></div><div class="codebox"><pre><code>
#InputLevel, 1
SetTimer, Send, 1000

1::
Send:
	Send {Enter}
	return
</code></pre></div><p>Но с InputLevel не принимаются посылы по таймеру.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:43:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113791#p113791</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113790#p113790</link>
			<description><![CDATA[<p>Принимающий:<br /></p><div class="codebox"><pre><code>Enter:: MsgBox, , , %A_ThisHotkey%, 0.1</code></pre></div><p>Если отправляющий<br /></p><div class="codebox"><pre><code>1:: Send {Enter}</code></pre></div><p>то сообщение не появится, а если отправляющий<br /></p><div class="codebox"><pre><code>#InputLevel 1
1:: Send {Enter}</code></pre></div><p>или<br /></p><div class="codebox"><pre><code>1::
   SendLevel, 1
   Send {Enter}
   Return</code></pre></div><p>то появится.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:42:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113790#p113790</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113789#p113789</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>SendLevel влияет на отправку, InputLervel — на получение.</p></blockquote></div><p>Не совсем правильно. SendLevel влияет на отправку из текущей ветки, #InputLervel — из всего скрипта. Если событие сгенерировано — level у принимающей ветки должен быть ниже, чем у отправляющей.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:36:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113789#p113789</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113786#p113786</link>
			<description><![CDATA[<p>Если перенести SendLevel в метку, то InputLevel не нужен, но всё таки непонятно влияние наличия InputLevel, когда SendLevel первой строкой (как в 4 посте).</p><div class="codebox"><pre><code>
SetTimer, Send, 1000

1::
Send:
	SendLevel, 1
	Send {Enter}
	return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 01:05:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113786#p113786</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113784#p113784</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>InputLervel — на получение</p></blockquote></div><p>Если убрать InputLevel, в отправляющем, то принимающий перестаёт принимать через нажатия, причём перенос InputLevel в принимающий ни на что не влияет. <br />Это если я тебя правильно понял про &quot;влияет на получение&quot;, то есть InputLevel по идее должен иметь значение только в первом скрипте, в том где Hotkey.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 00:58:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113784#p113784</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113781#p113781</link>
			<description><![CDATA[<p>Как добиться без SendLevel и InputLevel не знаю, а по остальному — SendLevel изменяет level только текущей ветки, а таймер создаёт (псевдо)новую. SendLevel влияет на отправку, InputLervel — на получение. И SendLevel должен быть выше, чем InputLervel, чтобы принимать генерируемые клавиатурные события.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 11 Mar 2017 00:45:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113781#p113781</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113779#p113779</link>
			<description><![CDATA[<p>И главное, как добится такой же работы не указывая SendLevel и InputLevel в скриптах посылающих нажатия?</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 00:26:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113779#p113779</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113778#p113778</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Какая то странная штука, если таких 2 скрипта запустить, то Hotkey не видит когда с таймера посыл, но реагирует на нажатие 1.</p></blockquote></div><p>По поводу этого, если добавить SendLevel то и на таймер реагирует:<br /></p><div class="codebox"><pre><code>#If 1
#If

Hotkey, If, 1
Hotkey, Enter, MyLabel    
Hotkey, If    
Return

MyLabel:
	MsgBox, , , %A_ThisHotkey%, 0.1
	Return </code></pre></div><div class="codebox"><pre><code>
SendLevel, 1
#InputLevel, 1
SetTimer, Send, 1000

1::
Send:
	Send {Enter}
	return
</code></pre></div><p>Из справки с переводчиком мне не понятно чем это обусловлено.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 00:23:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113778#p113778</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113777#p113777</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Тут вопрос, скорее, почему Space срабатывает.</p></blockquote></div><p>Повезло с примером. </p><p>Какая то странная штука, если таких 2 скрипта запустить, то Hotkey не видит когда с таймера посыл, но реагирует на нажатие 1.<br /></p><div class="codebox"><pre><code>
#If 1
#If

Hotkey, If, 1
Hotkey, Enter, MyLabel    
Hotkey, If    
Return

MyLabel:
	MsgBox, , , %A_ThisHotkey%, 0.3
	Return  
</code></pre></div><div class="codebox"><pre><code>#InputLevel, 1

SetTimer, Send, 1000

1::
Send:
	Send {Enter}
	return
</code></pre></div><p>А если внутри себя, то не видит когда нажимаем 1, но с таймера видит:<br /></p><div class="codebox"><pre><code>
#If 1
#If
SendLevel, 1
Hotkey, If, 1
Hotkey, Enter, MyLabel    
Hotkey, If
SetTimer, Send, 1000
Return

MyLabel:
	MsgBox, , , %A_ThisHotkey%, 0.3
	Return

1::
Send:
	Send {Enter}
	return	
</code></pre></div><p>Где такое описано...</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 11 Mar 2017 00:07:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113777#p113777</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Запуск Hotkey с помощью Send]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=113776#p113776</link>
			<description><![CDATA[<p>Тут вопрос, скорее, почему Space срабатывает.<br />Такой пример вызывает срабатывание:<br /></p><div class="codebox"><pre><code>Send {Space}
Space:: MsgBox, % A_ThisHotkey</code></pre></div><p>А такой нет:<br /></p><div class="codebox"><pre><code>Send {Enter}
Enter:: MsgBox, % A_ThisHotkey</code></pre></div><p><a href="https://autohotkey.com/docs/commands/SendLevel.htm">SendLevel</a>:<br /></p><div class="quotebox"><blockquote><p>By default, hook hotkeys and hotstrings ignore keyboard and mouse events generated by any AutoHotkey script</p></blockquote></div><div class="codebox"><pre><code>#If 1
#If

Hotkey, If, 1
Hotkey, Space, MyLabel    
Hotkey, If
SendLevel, 1
Send {Space}
Return

MyLabel:
	MsgBox %A_ThisHotkey%
	Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 10 Mar 2017 23:29:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=113776#p113776</guid>
		</item>
	</channel>
</rss>
