<?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=7889&amp;type=atom" />
	<updated>2012-12-22T11:21:53Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7889</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67344#p67344" />
			<content type="html"><![CDATA[<p>Кажется, вы забыли создать тему.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-12-22T11:21:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67344#p67344</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67341#p67341" />
			<content type="html"><![CDATA[<p>Всем доброго времени суток!</p><p>&nbsp; &nbsp; &nbsp;В общем у меня похожая ситуация: необходимо пропускать нажатие клавиши (к примеру F1) раз в несколько секунд (к примеру раз в 2 сек) как при раздельном нажатии, там и при зажатой клавиши... Т.е. скрипт должен пропустить одно нажатие, после чего блокировать сигналы&nbsp; на 2000мс, затем снимать блокировку.<br />&nbsp; &nbsp; &nbsp;Для этого воспользовался скриптом из из ветки <a href="http://forum.script-coding.com/viewtopic.php?pid=67256#p67256">http://forum.script-coding.com/viewtopi … 256#p67256</a>, заменив LButton на F1. В итоге результата не достиг...<br />&nbsp; &nbsp; &nbsp;Подскажите плж где закралась ошибка.</p>]]></content>
			<author>
				<name><![CDATA[znick]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29307</uri>
			</author>
			<updated>2012-12-22T10:38:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67341#p67341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67267#p67267" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Где тут главная фишка-блокировка LMB?</p></blockquote></div><div class="codebox"><pre><code>#if recharge
    *LButton::return
#if</code></pre></div><div class="quotebox"><blockquote><p>хотя из скрипта мне мало что стало понятно.</p></blockquote></div><p>Перечитайте код ещё раз, попробуйте запустить и посмотреть в «последние действия».</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-12-21T05:50:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67267#p67267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67265#p67265" />
			<content type="html"><![CDATA[<p>Спасибо за помощь, хотя из скрипта мне мало что стало понятно.<br />Где тут главная фишка-блокировка LMB?</p>]]></content>
			<author>
				<name><![CDATA[Kokkolar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27388</uri>
			</author>
			<updated>2012-12-21T05:34:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67265#p67265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67264#p67264" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>fireRate := 100 ; как часто требуется проверять
rechargeTimeout := 3000 ; длительность перезарядки

~LButton::SetTimer, CheckAmmo, %fireRate%

#if recharge
    *LButton::return
#if

CheckAmmo:
    if !GetKeyState(&quot;LButton&quot;, &quot;P&quot;) {
        SetTimer, CheckArmmo, Off
        return
    }
    if LastAmmo() {
        Send, {LButton Up}
        recharge := true
        SetTimer, FireAtWill, -%rechargeTimeout%
        Hotkey, ~LButton, Off
        SetTimer, CheckArmmo, Off
    }
    return

FireAtWill:
    recharge := false
    Hotkey, ~LButton, On
    return

LastAmmo() {
    ; а вот здесь должен быть код каким-либо образом проверяющий не пора ли отпускать зажатую кнопку
    return true ; всегда отключаем lbutton на 3 секунды после нажатия.
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-12-21T04:46:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67264#p67264</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67263#p67263" />
			<content type="html"><![CDATA[<p>Не совсем понял про периодичность, может с видео будет понятней что мне надо.<br /><a href="http://www.youtube.com/watch?v=-_9IOefwhBA">http://www.youtube.com/watch?v=-_9IOefwhBA</a></p>]]></content>
			<author>
				<name><![CDATA[Kokkolar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27388</uri>
			</author>
			<updated>2012-12-21T04:38:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67263#p67263</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67261#p67261" />
			<content type="html"><![CDATA[<p>С какой периодичностью?</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-12-21T04:19:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67261#p67261</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67256#p67256" />
			<content type="html"><![CDATA[<p>Почему в заголовке темы «на некоторое время», а в сообщении «при более … секунд […] блокировал дальнейшие…»?</p><div class="codebox"><pre><code>pressDuration := 2000

~LButton::return
~LButton Up::
    if flag := A_PriorHotkey = &quot;~LButton&quot; &amp;&amp; A_TimeSincePriorHotkey &gt; pressDuration {
        Hotkey ~LButton Up, Off
        Hotkey ~LButton, Off
    }
    return

#if flag
    *LButton::return
#if

Space::
    flag := false
    Hotkey ~LButton Up, On
    Hotkey ~LButton, On
    return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2012-12-21T03:13:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67256#p67256</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: блокировка реального нажатия мышкой, на некоторое время]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=67254#p67254" />
			<content type="html"><![CDATA[<p>Для примера:</p><p>Мне нужно чтобы при удержании ЛКМ более 2(тут может быть необазятельно таймер, но и циклическая проверка на цвет) секунд AHK временно блокировал дальнейшие обращения ЛКМ.</p><p>То есть нужна блокировка физического нажатия/удержания ЛКМ после 2 секунды.</p><p>Спасибо за ответы.</p>]]></content>
			<author>
				<name><![CDATA[Kokkolar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27388</uri>
			</author>
			<updated>2012-12-21T01:49:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=67254#p67254</id>
		</entry>
</feed>
