<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13969&amp;type=atom" />
	<updated>2018-07-22T21:16:04Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13969</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127292#p127292" />
			<content type="html"><![CDATA[<p><strong>powercat</strong><br />Вам надо Coord Mode кое какой добавить, а то за секунду мало ли что произойдёт.<br /></p><div class="codebox"><pre><code>
#NoEnv
#Persistent
SetBatchLines, -1

func(&quot;1000&quot;)
Return

func(time)
{
	run notepad
	WinWaitActive ahk_exe notepad.exe
	MouseGetPos, x, y
	WinMinimize
    Sleep, %time%
	MouseMove, x, y
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-07-22T21:16:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127292#p127292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127290#p127290" />
			<content type="html"><![CDATA[<p>Спасибо большое.</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-07-22T18:43:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127290#p127290</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127289#p127289" />
			<content type="html"><![CDATA[<p>Кстати, вместо GetLastError в AHK есть A_LastError.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-22T17:54:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127289#p127289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127288#p127288" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, да, точно! Совсем забыл про MouseMove. Так уж повелось, что пользуюсь WinApi для махинаций с мышью.</p><p>Тогда вот так:<br /></p><div class="codebox"><pre><code>#NoEnv
#Persistent
SetBatchLines, -1

func(&quot;1000&quot;)

func(time)
{
	MouseGetPos, x, y
     Sleep, %time%
	MouseMove, x, y
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[powercat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37884</uri>
			</author>
			<updated>2018-07-22T17:48:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127288#p127288</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127286#p127286" />
			<content type="html"><![CDATA[<p><strong>powercat</strong>, откройте для себя MouseMove, и всё станет совсем просто.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-07-22T17:29:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127286#p127286</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127284#p127284" />
			<content type="html"><![CDATA[<p>Самое простое вот так:<br /></p><div class="codebox"><pre><code>#NoEnv
#Persistent
SetBatchLines, -1

func(&quot;1000&quot;)

func(time)
{
	MouseGetPos, x, y
     Sleep, %time%
	SetCursorPos(x, y)
}

SetCursorPos(X, Y)
{
	if !(DllCall(&quot;user32.dll\SetCursorPos&quot;, &quot;Int&quot;, X, &quot;Int&quot;, Y))
		return DllCall(&quot;kernel32.dll\GetLastError&quot;)
	return 1
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[powercat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37884</uri>
			</author>
			<updated>2018-07-22T17:10:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127284#p127284</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK Gui: Как сохранять и возвращать курсор мышки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=127283#p127283" />
			<content type="html"><![CDATA[<p>Нужно чтобы мышка возвращалась на туже точку которая была пол секунды секунду назад. Как это сделать?</p>]]></content>
			<author>
				<name><![CDATA[DaGer]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39390</uri>
			</author>
			<updated>2018-07-22T16:11:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=127283#p127283</id>
		</entry>
</feed>
