<?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=5843</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5843&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Потоки метки».]]></description>
		<lastBuildDate>Sat, 28 May 2011 11:50:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Потоки метки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48748#p48748</link>
			<description><![CDATA[<p>Мне не совсем ясна цель всего этого, но в любом случае нужно учитывать, что AHK не поддерживает многопоточность, и начать новый поток можно, только прервав предыдущий.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 28 May 2011 11:50:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48748#p48748</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Потоки метки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48746#p48746</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="quotebox"><cite>Gorvin пишет:</cite><blockquote><p>Собственно есть возможность заставить его запустить второй поток TestLabel пока первый ждет нажатия кнопки мыши?</p></blockquote></div><div class="codebox"><pre><code>#MaxThreadsPerHotkey 2
test = 0
F12::
test++
if test &gt; 1
{
    MsgBox test: %test%
    return
}
KeyWait, LButton, D
MsgBox test: %test%
Return</code></pre></div></blockquote></div><p>То что MaxThreadsPerHotkey отлично работает для кнопки я прекрасно знаю, но меня интересует именно второй поток лейбла по таймеру. Пока нашел только кривой выход. Что тот nипа:<br /></p><div class="codebox"><pre><code>F12::
test++
SetTimer, TestLabel_%test%, 400
Return

TestLabel_1:
...
Return

TestLabel_2:
...
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Gorvin)]]></author>
			<pubDate>Sat, 28 May 2011 11:00:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48746#p48746</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Потоки метки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48739#p48739</link>
			<description><![CDATA[<div class="quotebox"><cite>Gorvin пишет:</cite><blockquote><p>Собственно есть возможность заставить его запустить второй поток TestLabel пока первый ждет нажатия кнопки мыши?</p></blockquote></div><div class="codebox"><pre><code>#MaxThreadsPerHotkey 2
test = 0
F12::
test++
if test &gt; 1
{
    MsgBox test: %test%
    return
}
KeyWait, LButton, D
MsgBox test: %test%
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 28 May 2011 07:26:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48739#p48739</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Потоки метки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48736#p48736</link>
			<description><![CDATA[<p>Есть матка которая запускается по SetTimer внутри которой есть пауза keywait, что собственно блокирует горячую клавишу.<br />Пример:<br /></p><div class="codebox"><pre><code>test = 0
F12::
test++
SetTimer, TestLabel, 400
Return


End::ExitApp

TestLabel:
SetTimer, TestLabel, off
if test &gt; 1
{
    MsgBox test: %test%
    return
}
KeyWait, LButton, D
MsgBox test: %test%
Return</code></pre></div><p>Если использовать MaxThreadsPerHotkey то он не выполняет метку в отдельном потоке, а дожидается завершения первого. Собственно есть возможность заставить его запустить второй поток TestLabel пока первый ждет нажатия кнопки мыши? Ну или хотя бы можно определить сколько запущено потоков обрабатывающих нажатие данной клавиши и если их два и более запустить другую метку?</p>]]></description>
			<author><![CDATA[null@example.com (Gorvin)]]></author>
			<pubDate>Sat, 28 May 2011 03:18:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48736#p48736</guid>
		</item>
	</channel>
</rss>
