<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9860&amp;type=atom" />
	<updated>2014-08-03T13:54:26Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=9860</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85580#p85580" />
			<content type="html"><![CDATA[<p>Комментарий после &quot;; (координаты)&quot; , чтобы проще было ориентироваться к чему относится данный пиксель.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-03T13:54:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85580#p85580</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85579#p85579" />
			<content type="html"><![CDATA[<p>А что тут по задумке надо писать в InputBox ?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-02T22:00:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85579#p85579</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85578#p85578" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetWorkingDir %A_ScriptDir%

text := &quot;PixelSearch,,,&quot;
P := &quot;`,&quot; 
O := &quot;;&quot;
Name := &quot;A_RESULT&quot;
Name_Title := &quot;A_RESULT.txt&quot;

vkC0::    ; ~(Ё)
{
MouseGetPos, MouseX, MouseY

WinGetActiveTitle, Title
WinGetPos, Xm, Ym, Wm, Hm, %Title%
InputBox, UserInput

PixelGetColor, color, %MouseX%, %MouseY%

xvar := MouseX/A_ScreenWidth
yVar := MouseY/A_ScreenHeight

x = Round((Xm+Wm)*%xVar%)
y = Round((Ym+Hm)*%yVar%)

FileAppend, %text% %x%%P% %y%%P% %x%%P% %y%%P% %color%%P%%P% fast        %O% (%MouseX%%P% %MouseY%) %UserInput%, %Name_Title%
FileAppend, `nif ErrorLevel = 0, %Name_Title%
FileAppend, `n`n, %Name_Title%

Process, Close, %PID1%    
Run, %Name%.txt,, Min, PID1

WinActivate, %Title%
}
Return</code></pre></div><p>Дописал скрипт, чтобы на будущее &quot;фотографировать&quot; пиксели с алгоритмом масштабирования. Можете дополнить если есть какие идеи.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-02T21:07:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85578#p85578</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85566#p85566" />
			<content type="html"><![CDATA[<p>В принципе вся эта относительность действительно может иногда понадобится. <br />Потому в AhkSpy добавил строку &quot;Relative pos to a window&quot;.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T18:22:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85566#p85566</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85562#p85562" />
			<content type="html"><![CDATA[<p>Попробовал перенести тестовый скрипт на ноутбук: <br /></p><div class="codebox"><pre><code>
WinGetPos, Xm, Ym, Wm, Hm, ahk_class NAME
NumPad2::
PixelSearch,,, Round(Wm*0.0098958333333333), Round(Hm*0.7407407407407407), Round(Wm*0.0098958333333333), Round(Hm*0.7407407407407407), 0x333333,, fast
if !ErrorLevel
MsgBox, Успешно!
Return</code></pre></div><p>И все координаты прекрасно работают! </p><p>WinGetPos в цикл тогда напишу, а то если запустить скрипт с отсутствием ahk_class NAME, то WinGetPos вначале скрипта бесполезен будет после запуска ahk_class NAME.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-01T16:40:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85562#p85562</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85561#p85561" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Отредактировано Странникх (Сегодня 19:44:46) пишет:</cite><blockquote><p>Round округляет с .5 , сотые, тысячные и т.д. берутся в расчет?</p></blockquote></div><p>В (даже) русском хелпе написано:<br /></p><div class="quotebox"><blockquote><p>параметр Number округляется до ближайшего целого числа.</p></blockquote></div><p><strong>И зачем сотые, тысячные</strong>, когда округлять нам надо до целого числа, и единственное что нам интересно, это десятые. Это уже не школьная программа, это детский сад какой то.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T16:34:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85561#p85561</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85560#p85560" />
			<content type="html"><![CDATA[<p>Тут один пиксель роли несыиграет, иначе надо знать также алгоритм масштабирования окон исходя из разрешения.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T15:52:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85560#p85560</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85559#p85559" />
			<content type="html"><![CDATA[<p>Зачем спрашивать, поместите в функцию разные числа, и увидите сами.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T15:46:21Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85559#p85559</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85558#p85558" />
			<content type="html"><![CDATA[<p>Коэффициент немного разный, вот и спрашиваю. 1600\1920 = 0.8333 , 1134\1366 = 0.8301. Round округляет с .5 , сотые, тысячные и т.д. берутся в расчет?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-01T15:43:14Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85558#p85558</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85556#p85556" />
			<content type="html"><![CDATA[<p>Ну вы же сами видите что 1134 это правильно.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T15:29:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85556#p85556</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85555#p85555" />
			<content type="html"><![CDATA[<p>Есть координата 1600 по ширине с монитора 1920на1080 разрешения. Я хочу перевести эту координату на другое разрешение 1366на768.<br />Координата 1600 выглядит как = Round(W * 0.83) или Round(W * 1.2), то есть на текущем (моем) мониторе как 1920*0.83 или 1920*1.2, соответственно 1366*1.2 или 1366*0.83. С 1366*1.2 получается больше 1366. С 1366*0.83 получается 1133.78 ~= 1134. 1134 будет истинным или нужно искать другой коэффициент?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-01T15:25:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85555#p85555</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85554#p85554" />
			<content type="html"><![CDATA[<p>Ммм... Что?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T15:17:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85554#p85554</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85553#p85553" />
			<content type="html"><![CDATA[<p>А число 1600 при переводе на другое разрешение будет одним и тем же если его делить и на 1.2 и на 0.83? Или тут играет роль что на что делить?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-08-01T15:15:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85553#p85553</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85552#p85552" />
			<content type="html"><![CDATA[<p>Просто так намного понятнее, 0.25 первая четверть, 0.5 половина, 0.75 три четверти. 0.83 правее трёх четвертей, это сразу понятно, а 1.2 тяжело понять где это.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-08-01T15:11:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85552#p85552</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Скрипт для перевода координат на другое разрешение]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=85550#p85550" />
			<content type="html"><![CDATA[<p>Два раза прочитал тему. Не пойму, что нужно добиться и в чём загвоздка.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-08-01T14:39:03Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=85550#p85550</id>
		</entry>
</feed>
