<?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=6050&amp;type=atom" />
	<updated>2011-07-25T07:29:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6050</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сложение и вычитание]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50160#p50160" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>U:= RY-100, R:= RX+100</code></pre></div></blockquote></div><p>Спосибо все работает очень стыдно на пустом месте запутался. 3 дня не мог сообразить</p>]]></content>
			<author>
				<name><![CDATA[Invalid]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24789</uri>
			</author>
			<updated>2011-07-25T07:29:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50160#p50160</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сложение и вычитание]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50144#p50144" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>U:= RY-100, R:= RX+100</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-07-24T09:51:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50144#p50144</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Сложение и вычитание]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50141#p50141" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Loop 
{
GetKeyState, XJ, JoyX
GetKeyState, YJ, JoyY
If (XJ &lt; 99) and (XJ &gt; 1) and (YJ = 0)
{
MouseGetPos,x,y
if Y &gt; 500
Send {Click 500 400 0}
if (X = 500) and (Y = 400)
MouseMove, 0, 0, 0, R
if (X &gt; 500) and (Y &lt; 501)
MouseMove, -10, -10, 0, R
if (X &lt; 500) and (Y &lt; 501)
MouseMove, 10, -10, 0, R
}
If (XJ = 100) and (YJ &gt; 1) and (YJ &lt; 99)
{
MouseGetPos,x,y
if X &lt; 500
Send {Click 600 500 0}
if (X = 600) and (Y = 500)
MouseMove, 0, 0, 0, R
if (X &gt; 499) and (Y &lt; 500)
MouseMove, 10, 10, 0, R
if (X &gt; 499) and (Y &gt; 500)
MouseMove, 10, -10, 0, R
}
If (XJ &lt; 99) and (XJ &gt; 1) and (YJ = 100)
{
MouseGetPos,x,y
if Y &lt; 500
Send {Click 500 600 0}
if (X = 500) and (Y = 600)
MouseMove, 0, 0, 0, R
if (X &lt; 500) and (Y &gt; 499)
MouseMove, 10, 10, 0, R
if (X &gt; 500) and (Y &gt; 499)
MouseMove, -10, 10, 0, R
}
If (XJ = 0) and (YJ &gt; 1) and (YJ &lt; 99)
{
MouseGetPos,x,y
if X &gt; 500
Send {Click 400 500 0}
if (X = 400) and (Y = 500)
MouseMove, 0, 0, 0, R
if (X &lt; 501) and (Y &lt; 500)
MouseMove, -10, 10, 0, R
if (X &lt; 501) and (Y &gt; 500)
MouseMove, -10, -10, 0, R
}
}</code></pre></div><p>Скрипт при вращении рукоятки 1го джойстика чертит на экране ромб нужно менять его положение не переписывая всех координат </p><p>пробовал так<br /></p><div class="codebox"><pre><code>RX:= 400
RY:= 400
U:= %RY%-100
R:= %RX%+100
D:= %RY%+100
L:= %RX%-100
Loop 
{
GetKeyState, XJ, JoyX
GetKeyState, YJ, JoyY
If (XJ &lt; 99) and (XJ &gt; 1) and (YJ = 0)
{
MouseGetPos,x,y
if Y &gt; %RY%
Send {Click %RX% %U% 0}
if (X = %RX%) and (Y = %U%)
MouseMove, 0, 0, 0, R
if (X &gt; %RX%) and (Y &lt; %RY%)
MouseMove, -10, -10, 0, R
if (X &lt; %RX%) and (Y &lt; %RY%)
MouseMove, 10, -10, 0, R
}
If (XJ = 100) and (YJ &gt; 1) and (YJ &lt; 99)
{
MouseGetPos,x,y
if X &lt; %RX%
Send {Click %R% %RY% 0}
if (X = %R%) and (Y = %RY%)
MouseMove, 0, 0, 0, R
if (X &gt; %RX%) and (Y &lt; %RY%)
MouseMove, 10, 10, 0, R
if (X &gt; %RX%) and (Y &gt; %RY%)
MouseMove, 10, -10, 0, R
}
If (XJ &lt; 99) and (XJ &gt; 1) and (YJ = 100)
{
MouseGetPos,x,y
if Y &lt; %RY%
Send {Click %RX% %D% 0}
if (X = %RX%) and (Y = %D%)
MouseMove, 0, 0, 0, R
if (X &lt; %RX%) and (Y &gt; %RY%)
MouseMove, 10, 10, 0, R
if (X &gt; %RX%) and (Y &gt; %RY%)
MouseMove, -10, 10, 0, R
}
If (XJ = 0) and (YJ &gt; 1) and (YJ &lt; 99)
{
MouseGetPos,x,y
if X &gt; %RX%
Send {Click %L% %RY% 0}
if (X = %L%) and (Y = %RY%)
MouseMove, 0, 0, 0, R
if (X &lt; %RX%) and (Y &lt; %RY%)
MouseMove, -10, 10, 0, R
if (X &lt; %RX%) and (Y &gt; %RY%)
MouseMove, -10, -10, 0, R
}
}</code></pre></div><p>Но команды U:= %RY%-100 R:= %RX%+100 видимо не работают подскажите как правильно записать зарание спосибо</p>]]></content>
			<author>
				<name><![CDATA[Invalid]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24789</uri>
			</author>
			<updated>2011-07-24T07:34:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50141#p50141</id>
		</entry>
</feed>
