<?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=9978&amp;type=atom" />
	<updated>2014-09-17T14:09:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9978</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86571#p86571" />
			<content type="html"><![CDATA[<p>Подскажите пожалуйста как поместить значения из &quot;ListBox&quot; в цикл. Код приведённый ниже не работает .</p><div class="codebox"><pre><code>gui, font, cBlue W80 H80 s18
Gui, Add, ListBox, x12 y10 w490 h680 Multi  vDllCall3 gMySubroutine ,
Gui, Show,
return

*~F7::
Gui Submit, NoHide
   MouseGetPos, pos1, pos2
    if !x0
      x0:= - pos1, y0 := - pos2
   Else
   {
   GuiControl,, DllCall3, % &quot;&quot;- pos1 -x0 &quot;,&quot;- pos2 -y0 &quot;,&quot; . A_TimeSincePriorHotkey . &quot;`n&quot; 
   x0:= - pos1, y0 := - pos2
   }
Return

*~lbutton::
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
DllCall(&quot;mouse_event&quot;,uint,1,int,Arr[A_Index*3-1],int,Arr[A_Index*2],uint,0,int,0)
DllCall(&quot;Sleep&quot;, UInt,Arr[A_Index*3])
}
Return

MySubroutine:
Gui Submit, NoHide
Arr := DllCall3
Return
GuiClose:
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-09-17T14:09:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86571#p86571</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86520#p86520" />
			<content type="html"><![CDATA[<p>Большое спасибо всё работает.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-09-16T19:20:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86520#p86520</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86515#p86515" />
			<content type="html"><![CDATA[<p>Если другие горячие клавиши не используются между нажатиями F7, то:<br /></p><div class="codebox"><pre><code>FileAppend,% &quot;Sleep, &quot; . A_TimeSincePriorHotkey . &quot;`n&quot;,555.ini
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-09-16T14:55:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86515#p86515</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86493#p86493" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Irbis пишет:</cite><blockquote><p>Да, действительно, после перемещения текущие координаты надо принять за новую точку отсчёта. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>F7::
   MouseGetPos, pos1, pos2
   if !x0
      x0:= pos1, y0 := pos2
   Else
   {
      FileAppend,% &quot;Mousemove,&quot; pos1 - x0 &quot;,&quot; pos2 -y0 &quot;,0 ,R `n&quot;,555.ini
      FileAppend,% &quot;Sleep, 60 `n&quot;,555.ini
      x0:= pos1, y0 := pos2
   }
Return</code></pre></div></blockquote></div><p>Спасибо большое всё работает . А не поможете разобраться как определить задержку между движениями мыши, что бы писалась в файл&nbsp; вместо &quot;Sleep, 60&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-09-15T21:19:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86493#p86493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86492#p86492" />
			<content type="html"><![CDATA[<p>Да, действительно, после перемещения текущие координаты надо принять за новую точку отсчёта. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>F7::
   MouseGetPos, pos1, pos2
   if !x0
      x0:= pos1, y0 := pos2
   Else
   {
      FileAppend,% &quot;Mousemove,&quot; pos1 - x0 &quot;,&quot; pos2 -y0 &quot;,0 ,R `n&quot;,555.ini
      FileAppend,% &quot;Sleep, 60 `n&quot;,555.ini
      x0:= pos1, y0 := pos2
   }
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-09-15T18:24:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86492#p86492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86490#p86490" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Хотелось бы узнать как это сделать от текущего положения курсора</p></blockquote></div><p>Запоминать текущее положение курсора, каждый следующий шаг вычислять разницу между текущим и предыдущим положением.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-09-15T17:31:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86490#p86490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86489#p86489" />
			<content type="html"><![CDATA[<p>Первое нажатие хоткея определяет &quot;точку отсчёта&quot;<br /></p><div class="codebox"><pre><code>F7::
   MouseGetPos, pos1, pos2
   if !x0
      x0:= pos1, y0 := pos2
   Else
   {
      FileAppend,% &quot;Mousemove,&quot; pos1 - x0 &quot;,&quot; pos2 -y0 &quot;,0 ,R `n&quot;,555.ini
      FileAppend,% &quot;Sleep, 60 `n&quot;,555.ini
   }
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2014-09-15T17:17:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86489#p86489</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Считать движения мыши от текущего положения курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=86487#p86487" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Подскажите как считать движения мыши от текущего положения курсора.<br />Я знаю что можно считать с помощью команды &quot;MouseGetPos&quot;,но эта&nbsp; команда считывает положение курсора от верхнего левого угла экрана. Хотелось бы узнать как это сделать от текущего положения курсора &quot;R&quot;. Вот код который я накидал но он работает неправильно, считывает от верхнего левого угла экрана.</p><div class="codebox"><pre><code>F7::
  MouseGetPos, pos1, pos2
 FileAppend,% &quot;Mousemove,&quot; pos1 &quot;,&quot; pos2 &quot;,0 ,R `n&quot;,555.ini
FileAppend,% &quot;Sleep, 60 `n&quot;,555.ini
  Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2014-09-15T17:05:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=86487#p86487</id>
		</entry>
</feed>
