<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=5213&amp;type=atom" />
	<updated>2012-09-23T22:24:34Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=5213</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=64117#p64117" />
			<content type="html"><![CDATA[<p>На офф.форуме имеется тема <a href="http://www.autohotkey.com/community/viewtopic.php?t=25892">Lex&#039; Mouse Gestures</a> by Lexicos.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2012-09-23T22:24:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=64117#p64117</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=64110#p64110" />
			<content type="html"><![CDATA[<p>По теме.<br />Кажется всё проще, нужно отслеживать, насколько курсор сместился от центра. А чтобы он не доходил до края экрана, периодически возвращать его в центр.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2012-09-23T18:19:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=64110#p64110</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48796#p48796" />
			<content type="html"><![CDATA[<p>Спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[vinternete]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25439</uri>
			</author>
			<updated>2011-05-29T16:57:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48796#p48796</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48670#p48670" />
			<content type="html"><![CDATA[<p>Заменить<br /></p><div class="codebox"><pre><code>Send, % Gestures</code></pre></div><p>на<br /></p><div class="codebox"><pre><code>Sendplay, % Gestures</code></pre></div>]]></content>
			<author>
				<name><![CDATA[InFlames]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24849</uri>
			</author>
			<updated>2011-05-25T15:24:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48670#p48670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48661#p48661" />
			<content type="html"><![CDATA[<p>Можно ли как-то сделать, чтобы <br /> </p><div class="codebox"><pre><code>If (Abs(DX) &gt;= Sensitivity)
            Gesture := (DX &gt; 0 ? &quot;{Right}&quot; : &quot;{Left}&quot;), NewGesture := 1
         If (Abs(DY) &gt;= Sensitivity)
            Gesture := (DY &gt; 0 ? &quot;{Down}&quot; : &quot;{Up}&quot;), NewGesture := 1</code></pre></div><p>Up, Down..... посылались как sendplay?</p>]]></content>
			<author>
				<name><![CDATA[vinternete]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25439</uri>
			</author>
			<updated>2011-05-25T12:57:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48661#p48661</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48319#p48319" />
			<content type="html"><![CDATA[<p>Спасибо. Убавляешь sensitivity и тянешь мышь, вроде оно... Лучше бы было конечно при отпускании RButton.</p>]]></content>
			<author>
				<name><![CDATA[andysss]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25388</uri>
			</author>
			<updated>2011-05-12T03:34:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48319#p48319</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48215#p48215" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>andysss пишет:</cite><blockquote><p>...а можно чтобы постоянно шло нажатие до тех пор, пока не отожмётся RButton?</p></blockquote></div><p>Можно, но уже без варианта когда в хоткее есть функция посыла самой себя в статичном состоянии, хотя наверное можно и это исправить (я не имею ввиду ~ перед хоткеем).:</p><div class="codebox"><pre><code>Sensitivity = 20
CoordMode, Mouse
Return
Esc:: ExitApp
#IfWinActive, ahk_class Notepad
RButton::
   NewGesture = 1
   Loop
      {
         If NewGesture
         {
            MouseGetPos, StartX, StartY
            NewGesture =
         }
         MouseGetPos, X, Y
         DX := X - StartX, DY := Y - StartY
         If (Abs(DX) &gt;= Sensitivity)
            Gesture := (DX &gt; 0 ? &quot;{Right}&quot; : &quot;{Left}&quot;), NewGesture := 1
         If (Abs(DY) &gt;= Sensitivity)
            Gesture := (DY &gt; 0 ? &quot;{Down}&quot; : &quot;{Up}&quot;), NewGesture := 1
         If (NewGesture &amp;&amp; Gesture != PrevGesture)
            Gestures .= Gesture, PrevGesture := Gesture
         Sleep, 10
         Send, % Gestures
         Gestures := Gesture := PrevGesture := &quot;&quot;
         If GetKeyState(&quot;RButton&quot;, &quot;P&quot;) = 0
            break
      }
Return
RButton Up::Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-05-07T18:18:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48215#p48215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48211#p48211" />
			<content type="html"><![CDATA[<p>Ещё нюанс, а можно чтобы постоянно шло нажатие до тех пор, пока не отожмётся RButton?</p>]]></content>
			<author>
				<name><![CDATA[andysss]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25388</uri>
			</author>
			<updated>2011-05-07T09:30:45Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48211#p48211</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48208#p48208" />
			<content type="html"><![CDATA[<p>OFF:<strong>2andysss</strong>: далеко, очень далеко не пару секунд.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-05-06T19:17:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48208#p48208</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48206#p48206" />
			<content type="html"><![CDATA[<p>Спасибо! Для вас это пару секунд, для меня тёмный лес, иногда с просветами))</p>]]></content>
			<author>
				<name><![CDATA[andysss]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25388</uri>
			</author>
			<updated>2011-05-06T18:09:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48206#p48206</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48205#p48205" />
			<content type="html"><![CDATA[<p>Или так:</p><div class="codebox"><pre><code>Sensitivity = 20
CoordMode, Mouse
Return
Esc:: ExitApp
#IfWinActive, ahk_class Notepad
RButton::
   NewGesture = 1
   While GetKeyState(&quot;RButton&quot;, &quot;P&quot;)
      {
         If NewGesture
         {
            MouseGetPos, StartX, StartY
            NewGesture =
         }
         MouseGetPos, X, Y
         DX := X - StartX, DY := Y - StartY
         If (Abs(DX) &gt;= Sensitivity)
            Gesture := (DX &gt; 0 ? &quot;{Right}&quot; : &quot;{Left}&quot;), NewGesture := 1
         If (Abs(DY) &gt;= Sensitivity)
            Gesture := (DY &gt; 0 ? &quot;{Down}&quot; : &quot;{Up}&quot;), NewGesture := 1
         If (NewGesture &amp;&amp; Gesture != PrevGesture)
            Gestures .= Gesture, PrevGesture := Gesture
         Sleep, 10
      }
   If !Gestures
      Send, {RButton}
   Else
      Send, % Gestures
      Gestures := Gesture := PrevGesture := &quot;&quot;
Return
RButton Up::Return</code></pre></div><p>Разници нет (кроме оформления).</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-05-06T17:52:33Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48205#p48205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48202#p48202" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>andysss пишет:</cite><blockquote><p>Подскажите как...?</p></blockquote></div><div class="codebox"><pre><code>Sensitivity = 20
   CoordMode, Mouse
   Return
Esc:: ExitApp
#IfWinActive, ahk_class Notepad
RButton::
   NewGesture = 1
   While GetKeyState(&quot;RButton&quot;, &quot;P&quot;)
   {
      if NewGesture
      {
         MouseGetPos, StartX, StartY
         NewGesture =
      }
      MouseGetPos, X, Y
      DX := X - StartX, DY := Y - StartY
      if (Abs(DX) &gt;= Sensitivity)
         Gesture := (DX &gt; 0 ? &quot;Right&quot; : &quot;Left&quot;), NewGesture := 1
      if (Abs(DY) &gt;= Sensitivity)
         Gesture := (DY &gt; 0 ? &quot;Down&quot; : &quot;Up&quot;), NewGesture := 1
      if (NewGesture &amp;&amp; Gesture != PrevGesture)
         Gestures .= Gesture, PrevGesture := Gesture
      Sleep, 10
   }
   if !Gestures
      Send, {RButton}
   else
Send, {%Gestures%}
   Gestures := Gesture := PrevGesture := &quot;&quot;
   Return
RButton Up::Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-05-06T17:31:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48202#p48202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=48200#p48200" />
			<content type="html"><![CDATA[<p>Подскажите как в этом коде с блокнотом посылать нажатия клавиш Right, Left, Up, Down чтобы нажимались эти клавиши?</p><div class="codebox"><pre><code>Sensitivity = 20
   CoordMode, Mouse
   Return

Esc:: ExitApp

#IfWinActive, ahk_class Notepad
RButton::
   NewGesture = 1
   While GetKeyState(&quot;RButton&quot;, &quot;P&quot;)
   {
      if NewGesture
      {
         MouseGetPos, StartX, StartY
         NewGesture =
      }

      MouseGetPos, X, Y
      DX := X - StartX, DY := Y - StartY
      
      if (Abs(DX) &gt;= Sensitivity)
         Gesture := (DX &gt; 0 ? &quot;R&quot; : &quot;L&quot;), NewGesture := 1
         
      if (Abs(DY) &gt;= Sensitivity)
         Gesture := (DY &gt; 0 ? &quot;D&quot; : &quot;U&quot;), NewGesture := 1
         
      if (NewGesture &amp;&amp; Gesture != PrevGesture)
         Gestures .= Gesture, PrevGesture := Gesture
         
      Sleep, 10
   }
   if !Gestures
      Send, {RButton}
   else
      MsgBox, % Gestures   ; здесь назначить действие в зависимости от значения Gestures
   Gestures := Gesture := PrevGesture := &quot;&quot;
   Return

RButton Up::Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[andysss]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25388</uri>
			</author>
			<updated>2011-05-06T13:40:04Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=48200#p48200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=43987#p43987" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>...А если курсор упрётся в край экрана? Программа не поймёт, что мышка всё ещё двигается?</p></blockquote></div><p>На этот случай есть <a href="http://www.loonies.narod.ru/cursorus.htm">CursorUS</a> <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-01-18T00:09:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=43987#p43987</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Назначить действие на движение мыши]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=42276#p42276" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>с 3 раз не поняли</p></blockquote></div><p>Ну, видно ума не хватило! <img src="//forum.script-coding.com/img/smilies/lol.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-11-27T19:03:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=42276#p42276</id>
		</entry>
</feed>
