<?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=8901&amp;type=atom" />
	<updated>2013-11-22T20:49:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8901</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77479#p77479" />
			<content type="html"><![CDATA[<p>Спасибо всем. Вот накидал код для переделки &quot;мышки компаса 3D&quot; под мышку AutoCad. Кто знает - тот поймет.</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>if WinActivate, Компас 
{
    XButton1:: Send, {Delete}
    starttime := A_TickCount
    doubleclick:=0
    
    ^RButton::
    starttime1 := A_TickCount
    KeyWait, RButton
    elapsedtime := A_TickCount - starttime1
    IF (elapsedtime &gt; 350)
    {
        ;Долгое нажатие
        ;soundbeep, 100, 500
        Send::{RButton}    
    }            
    else
    {
        elapsedtime := A_TickCount - starttime
        IF (elapsedtime &lt; 250) and (doubleclick=1)
         {
                ;Двойной клик
                ;Send:: RButton
                ;soundbeep, 1000, 50
                Send:: {^Enter}               
                doubleclick:=0
                return
           }
        else::
            {
            ;Одиночный клик
            ;soundbeep, 1500, 100
            Send:: {^Enter}      
            doubleclick:=1
            }    
    }
    starttime := A_TickCount
    return
}</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[Vasiliy_Andr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26951</uri>
			</author>
			<updated>2013-11-22T20:49:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77479#p77479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77388#p77388" />
			<content type="html"><![CDATA[<p>AHK :: Разные действия для одиночного и двойного нажатия клавиши<br />AHK: Многодельность клавиши<br />AHK: Как отследить сколько времени нажата клавиша?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-11-18T03:46:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77388#p77388</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77386#p77386" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Воспользуйтесь поиском. По-моему, определение двойного нажатия есть в Коллекции.</p></blockquote></div><p>Мне нужно определение длительности нажатия, о чем и гласит название темы</p>]]></content>
			<author>
				<name><![CDATA[Vasiliy_Andr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26951</uri>
			</author>
			<updated>2013-11-17T21:23:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77386#p77386</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77378#p77378" />
			<content type="html"><![CDATA[<p>Так я про то и говорю, что до этих правил мне фиолетово, я русский язык не выучу никогда, и желания нет. <br />Непонятно почему у кого то <span class="bbu">незаметно совсем явное</span>, а кому то надо обязательно посередине темы внезапно развить &quot;дискуссию&quot; по поводу не правильной запятой.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-11-17T14:01:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77378#p77378</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77377#p77377" />
			<content type="html"><![CDATA[<p>serzh82saratov, Вы же неплохой программер и быстро выучили кучу команд на автохотки, не думаю, что вам будет&nbsp; сложно запомнить пару правил русского языка: перед &quot;и&quot; запятая практически никогда не ставится, &quot;не&quot; c глаголами пишется раздельно и &quot;то, либо, нибудь, кое, таки, ка&quot; через дефис.<br />А то, вот эта ваша фраза непонятно выглядит <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="quotebox"><blockquote><p>как то непонятно выглядит</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2013-11-17T13:54:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77377#p77377</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77376#p77376" />
			<content type="html"><![CDATA[<p>На фоне периодических споров по поводу неправильной запятой в постах участников форума, как то непонятно выглядит отношение к ярко выраженной, и нарочно сделанной ошибки в названии темы. <br />Хотя я просто наверное не знаю что такое мыФка, можно ссылку для ликбез-а, поиск мне не помог.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-11-17T13:35:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77376#p77376</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77375#p77375" />
			<content type="html"><![CDATA[<p>Воспользуйтесь поиском. По-моему, определение двойного нажатия есть в Коллекции.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2013-11-17T12:48:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77375#p77375</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77373#p77373" />
			<content type="html"><![CDATA[<p>На всем форуме нет разбирающихся?</p>]]></content>
			<author>
				<name><![CDATA[Vasiliy_Andr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26951</uri>
			</author>
			<updated>2013-11-17T10:44:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77373#p77373</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77306#p77306" />
			<content type="html"><![CDATA[<p>Для начала попробуйте прикрутить <a href="http://forum.script-coding.com/viewtopic.php?id=6148">правильное название темы</a>.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2013-11-14T18:04:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77306#p77306</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77285#p77285" />
			<content type="html"><![CDATA[<p>Нашел чтот то похожее но не могу понять как прикрутить<br />из поста <a href="http://forum.script-coding.com/viewtopic.php?pid=76853#p76853">Indomito</a></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>sbPressCountKeys:
  ;Если пауза меньше &quot;сPause_PressKey&quot; количества миллисекунд, то нажатие двойное, а если больше, то 
  ; оно расценивается как 2 одиночных.
  If not сSecond_PressKey
  {
    сSecond_PressKey := 1
    SetTimer, sbDoublePressKey, -%сPause_PressKey%
  }
  Else
  {
    сSecond_PressKey := 0
    SetTimer, %A_ThisHotkey%(2), -1
  }
Return

sbDoublePressKey:
  If not сSecond_PressKey
    Return
  сSecond_PressKey := 0
  SetTimer, %A_ThisHotkey%(1), -1
Return

fnHoldingBaseKey(vSleep, vCount)
  {
   Global сBaseKey  
    while ((GetKeyState(сBaseKey, &quot;P&quot;)) &amp;&amp; vCount)
      {
       sleep %vSleep%
       vCount--
      }
    if (vCount)
         return false
    return  true</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[Vasiliy_Andr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26951</uri>
			</author>
			<updated>2013-11-14T08:44:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77285#p77285</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Распознавание длительности нажатия кнопки мышки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=77200#p77200" />
			<content type="html"><![CDATA[<p>Нужен скрипт понимающий длину нажатия ПРАВОЙ кнопки мыши. <br />То есть при простом клике нажатие переопределяется как </p><div class="codebox"><pre><code>Enter</code></pre></div><p> , при нажатии более 250 мс переопределяется как</p><div class="codebox"><pre><code>RButton
;или ничего не делается</code></pre></div><p>, а при двойном нажатии переопределяется как</p><div class="codebox"><pre><code>^Enter</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Vasiliy_Andr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26951</uri>
			</author>
			<updated>2013-11-12T20:51:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=77200#p77200</id>
		</entry>
</feed>
