<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Некорректное смещение курсора при DllCall]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16369&amp;type=atom" />
	<updated>2021-05-19T18:34:25Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=16369</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148005#p148005" />
			<content type="html"><![CDATA[<p>Не обновил страницу когда решил написать.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-05-19T18:34:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148005#p148005</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147998#p147998" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, а <a href="https://forum.script-coding.com/viewtopic.php?pid=147992#p147992">тут</a> не нашли? <img src="//forum.script-coding.com/img/smilies/wink.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>2021-05-19T17:52:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147998#p147998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147997#p147997" />
			<content type="html"><![CDATA[<p><a href="https://autohotkey.com/board/topic/14356-different-co-ords-for-dllcall-getpixel-and-mouse-event/">Тут</a> нашёл инфу об этом.</p><p>Возвращает обратно в место, где был курсор при нажатии на F2:</p><div class="codebox"><pre><code>F2:: 
CoordMode, Mouse, Screen
MouseGetPos, X, Y
Sleep, 500
X := X*65535/A_ScreenWidth
Y := Y*65535/A_ScreenHeight
DllCall(&quot;mouse_event&quot;, uint,0x8001, int, X, int, Y, uint,0, int,0 )
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-05-19T17:24:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147997#p147997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147992#p147992" />
			<content type="html"><![CDATA[<p>Почему такое происходит, должна объяснять следующая цитата из статьи о <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event">mouse_event function</a>:<br /></p><div class="quotebox"><blockquote><p>If the MOUSEEVENTF_ABSOLUTE value is not specified, dx and dy specify relative motions from when <em>the last mouse event was generated</em> (the last reported position).</p></blockquote></div><p>Можно использовать абсолютные координаты, а не относительные.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-19T16:36:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147992#p147992</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147988#p147988" />
			<content type="html"><![CDATA[<p>Причем смещение появляется именно при первом вызове функции.<br />Если сделать цикл через Loop, то все последующие &quot;движения&quot; работают как и должны.</p>]]></content>
			<author>
				<name><![CDATA[Simachev.one]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41744</uri>
			</author>
			<updated>2021-05-19T11:48:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147988#p147988</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Некорректное смещение курсора при DllCall]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147986#p147986" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />При использовании последовательности команд<br />DllCall(&quot;mouse_event&quot;, uint, 1, int, x, int, y, uint, 0, int, 0) и<br />DllCall(&quot;mouse_event&quot;, uint, 1, int, -x, int, -y, uint, 0, int, 0)<br />Курсор возвращается не в исходное положение, а со смещением.<br />Кто может подсказать, где искать решение проблемы?<br />Заранее признателен за ответ.</p>]]></content>
			<author>
				<name><![CDATA[Simachev.one]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41744</uri>
			</author>
			<updated>2021-05-19T09:03:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147986#p147986</id>
		</entry>
</feed>
