<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; Движение мышкой]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=14094</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14094&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Движение мышкой».]]></description>
		<lastBuildDate>Sun, 19 Aug 2018 11:52:38 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Движение мышкой]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=128120#p128120</link>
			<description><![CDATA[<p>Ребят, нашел ответ, чтобы у вас в любой игре был поворот на нужную вам величину используйте этот скрипт:<br /></p><div class="codebox"><pre><code>
; =========== Sample script ============================================================
#SingleInstance,Force

; Send 2x mouse wheel down rolls at rate of 100ms 
F11::
	LLMouse.Wheel(-1, 2, 100)
	return

; Send 100x 10 unit mouse moves for the x axis at a rate of 2ms
F12::
	LLMouse.Move(0, 10, 100, 2) ; Поставив это&quot;LLMouse.Move(530, 0, 5, 9)&quot; вместо написанного в этой строке у меня получилось повернуться в игре на 180 град. 
	return

; =======================================================================================
; LLMouse - A library to send Low Level Mouse input

; Note that many functions have time and rate parameters.
; These all work the same way:
; times	- How many times to send the requested action. Optional, default is 1
; rate	- The rate (in ms) to send the action at. Optional, default rate varies
; Note that if you use a value for rate of less than 10, special code will kick in.
; QPX is used for rates of &lt;10ms as the AHK Sleep command does not support sleeps this short
; More CPU will be used in this mode.
class LLMouse {
	static MOUSEEVENTF_MOVE := 0x1
	static MOUSEEVENTF_WHEEL := 0x800
	
	; ======================= Functions for the user to call ============================
	; Move the mouse
	; All values are Signed Integers (Whole numbers, Positive or Negative)
	; x		- How much to move in the x axis. + is right, - is left
	; y		- How much to move in the y axis. + is down, - is up
	Move(x, y, times := 1, rate := 1){
		this._MouseEvent(times, rate, this.MOUSEEVENTF_MOVE, x, y)
	}
	
	; Move the wheel
	; dir	- Which direction to move the wheel. 1 is up, -1 is down
	Wheel(dir, times := 1, rate := 10){
		static WHEEL_DELTA := 120
		this._MouseEvent(times, rate, this.MOUSEEVENTF_WHEEL, , , dir * WHEEL_DELTA)
	}
	
	; ============ Internal functions not intended to be called by end-users ============
	_MouseEvent(times, rate, dwFlags := 0, dx := 0, dy := 0, dwData := 0){
		Loop % times {
			DllCall(&quot;mouse_event&quot;, uint, dwFlags, int, dx ,int, dy, uint, dwData, int, 0)
			if (A_Index != times){	; Do not delay after last send, or if rate is 0
				if (rate &gt;= 10){
					Sleep % rate
				} else {
					this._Delay(rate * 0.001)
				}
			}
		}
	}
	
	_Delay( D=0.001 ) { ; High Resolution Delay ( High CPU Usage ) by SKAN | CD: 13/Jun/2009
		Static F ; www.autohotkey.com/forum/viewtopic.php?t=52083 | LM: 13/Jun/2009
		Critical
		F ? F : DllCall( &quot;QueryPerformanceFrequency&quot;, Int64P,F )
		DllCall( &quot;QueryPerformanceCounter&quot;, Int64P,pTick ), cTick := pTick
		While( ( (Tick:=(pTick-cTick)/F)) &lt;D ) {
			DllCall( &quot;QueryPerformanceCounter&quot;, Int64P,pTick )
			Sleep -1
		}
		Return Round( Tick,3 )
	}
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alexstoun228)]]></author>
			<pubDate>Sun, 19 Aug 2018 11:52:38 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=128120#p128120</guid>
		</item>
		<item>
			<title><![CDATA[Движение мышкой]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=128119#p128119</link>
			<description><![CDATA[<p>Написал скрипт чтобы разворачиваться на опред. кол-во градусов в игре, но камера при активации поднимается вверх, а не по горизонтали как должна( В чем проблема?<br /></p><div class="codebox"><pre><code>
sc2::
MouseMove, 200, 0, , R
return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (alexstoun228)]]></author>
			<pubDate>Sun, 19 Aug 2018 11:19:49 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=128119#p128119</guid>
		</item>
	</channel>
</rss>
