<?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=12212&amp;type=atom" />
	<updated>2016-12-10T16:15:34Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12212</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109758#p109758" />
			<content type="html"><![CDATA[<p>Спасибо, я понял что делал не правильно. Первый вариант подходит.</p>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T16:15:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109758#p109758</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109757#p109757" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>переменные которые необходимо подставить в функцию &quot;Mousegetpos&quot;</p></blockquote></div><p>Переменные нельзя &quot;подставить&quot;.<br /></p><div class="codebox"><pre><code>MouseGetPos, OutputVarX, OutputVarY
if (CoordE = &quot;one&quot;) {
	x1 := OutputVarX, y1 := OutputVarY
} else if (CoordE = &quot;two&quot;) {
	x2 := OutputVarX, y2 := OutputVarY
}</code></pre></div><p>Либо так:</p><div class="codebox"><pre><code>Gui, Add, DropDownList, xp w120 y+10 vCoordE gCoordD, One|Two
Gui, Show
Return

CoordD:
Gui, Submit, NoHide
MouseGetPos, OutputVarX, OutputVarY
x%CoordE% := OutputVarX, y%CoordE% := OutputVarY
MsgBox % xOne &quot; : &quot; yOne &quot;`n&quot; xTwo &quot; : &quot; yTwo
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2016-12-10T15:55:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109757#p109757</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109756#p109756" />
			<content type="html"><![CDATA[<p>Нет. Попробую ещё раз объяснить. Есть выбор между двумя наборами переменных (их может быть и больше) Выбором определяются переменные которые необходимо подставить в функцию &quot;Mousegetpos&quot; для последующего задания в них координат, и дальнейшей записи в файл.</p>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T15:49:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109756#p109756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109754#p109754" />
			<content type="html"><![CDATA[<p>Слушайте, хватит со мной играть, я в курсе как пишется эта команда. Если это так просто и очевидно для вас, то почему вы не покажете примером, а издеваетесь на до мной? Перед тем как писать на форум я 10 раз думаю, и 15 раз читаю справку (английскую тоже) Я ни разу не программист не в одном языке, и многое в АХК для меня не то что загадка, а темный лес, учителей у меня так же нет!<br /></p><div class="codebox"><pre><code>Mousegetpos, CoordPrim2a, CoordPrim1a</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T15:24:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109754#p109754</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109753#p109753" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>x1 := 0, y1 := 0, x2 := 0, y2 := 0 ; ваши два набора переменных
Gui, Add, DropDownList, xp w120 y+10 vCoordE gCoordD, one|two
Gui, Show
Return
CoordD:
	Gui, Submit, NoHide
	if (CoordE = &quot;one&quot;) {
		x1 := 1, y1 := 2
	} else if (CoordE = &quot;two&quot;) {
		x2 := 1, y2 := 2
	}
	MsgBox % x1 &quot; : &quot; y1 &quot;`n&quot; x2 &quot; : &quot; y2
ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2016-12-10T15:12:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109753#p109753</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109750#p109750" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>А вы всетаки загляните туда и исправьте синтаксис MouseGetPos в вашем коде.</p></blockquote></div><p>Не понимаю ваших тонких намеков.<br /></p><div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Поместить одну переменную в другую можно оператором присвоения</p></blockquote></div><p>Так же, ни о чем не говорит.</p>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T14:28:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109750#p109750</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109745#p109745" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong><br />Нет, не правильно, это называется не вежливо тыкать в справку при первой возможности! Если вы не заметили, то &quot;MouseGetPos&quot; присутствует в коде, и что-то про &quot;MouseGetPos&quot; я уже прочитал в справке. Да чуть не забыл, мне нужно поместить координаты в два разных блока переменных по выбору, о чем я указал в первом сообщении.</p>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T09:57:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109745#p109745</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109744#p109744" />
			<content type="html"><![CDATA[<p>Если я правильно понимаю, это называется получить координаты курсора.<br />Справка → Мышь → MouseGetPos.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2016-12-10T09:40:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109744#p109744</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Два набора переменных для координат]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=109740#p109740" />
			<content type="html"><![CDATA[<p>Задача такова. Есть для выбора два набора переменных, в которые нужно поместить координаты мыши. С выбором переменных вроде ничего сложно, а вот как им задать координаты я не знаю.<br /></p><div class="codebox"><pre><code>F1::
Gui, Add, text, x+15 y+15, Координаты
Gui, Add, DropDownList, xp w120 y+10 vCoordE gCoordD, one|two
Gui, Show
Return
CoordD:
	Gui, Submit
	if CoordE = one
	{
		CoordPrim1a = watch1
		CoordPrim2a = watch2
	}
	if CoordE = two
	{
		CoordPrim1a = watch3
		CoordPrim2a = watch4
	}

	Gui, Destroy
Return
!^Lbutton::
	CoordMode, Mouse
		Mousegetpos, %CoordPrim2a%, %CoordPrim1a%
		msgbox %CoordPrim2a% %CoordPrim1a%
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-12-10T03:05:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=109740#p109740</id>
		</entry>
</feed>
