<?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=506&amp;type=atom" />
	<updated>2021-05-30T16:22:41Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=506</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148156#p148156" />
			<content type="html"><![CDATA[<p>Этот вариант не определяет цвет пикселя в заданных координатах, но находит текущий цвет. Может, кому полезна будет такая информация.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-05-30T16:22:41Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148156#p148156</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148154#p148154" />
			<content type="html"><![CDATA[<p>А как им можно найти цвет пикселя в заданных координатах?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-05-30T15:54:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148154#p148154</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148153#p148153" />
			<content type="html"><![CDATA[<p>Так вроде связанно. Это способ поиска цвета в программах, не только в Paint.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-05-30T15:50:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148153#p148153</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148150#p148150" />
			<content type="html"><![CDATA[<p>А это как связано с темой вопроса?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-05-30T15:06:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148150#p148150</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148139#p148139" />
			<content type="html"><![CDATA[<p>Eще пример для определения/смены текущего цвета в Paint в свернутом окне: <a href="https://reverseengineering.stackexchange.com/questions/13311/how-would-i-find-a-colors-memory-address-beginner">https://reverseengineering.stackexchang … s-beginner</a>. Можно перевести на ахк.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-05-30T06:38:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148139#p148139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148127#p148127" />
			<content type="html"><![CDATA[<p><strong>Achkosnik</strong>, если хотите получать ответы на этом форуме, <a href="https://forum.script-coding.com/viewtopic.php?id=16382">выполняйте правила</a>, исправьте свои сообщения.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-05-29T00:56:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148127#p148127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148126#p148126" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Пытался сделать в любой другой программе кроме пеинта выдаёт 0x0 на всех цветах</p>]]></content>
			<author>
				<name><![CDATA[Achkosnik]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41751</uri>
			</author>
			<updated>2021-05-29T00:44:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148126#p148126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=147635#p147635" />
			<content type="html"><![CDATA[<p>Можно ли <a href="http://forum.script-coding.com/viewtopic.php?pid=114477#p114477">http://forum.script-coding.com/viewtopi … 77#p114477</a> использовать как PixelSearch? И как это сделать?</p>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2021-05-03T18:42:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=147635#p147635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118966#p118966" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, сложность редактирования и определения нужного мне примера. Возникло подозрение, что такое невозможно.</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-08-31T00:54:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118966#p118966</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118965#p118965" />
			<content type="html"><![CDATA[<p>А кто вам мешает это проверить самому?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-08-31T00:52:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118965#p118965</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118963#p118963" />
			<content type="html"><![CDATA[<p>Скажите, пожалуйста, предложенные методы поиска пикселя в неактивном окне работают при условии активности полноэкранной игры?</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-08-31T00:36:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118963#p118963</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118492#p118492" />
			<content type="html"><![CDATA[<p>Нет, <a href="https://autohotkey.com/board/topic/29449-gdi-standard-library-145-by-tic/page-33#entry368918">видимо гораздо быстрее</a>.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-08-18T12:05:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118492#p118492</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=118490#p118490" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Также к недостаткам отнесу время работы вызываемой из Dll ф-ии GetPixel - 0.004 мс, что для FullHD дисплея выливается в 8 секунд</p></blockquote></div><p>А заменить на lockbits не пробовали?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-08-18T10:57:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=118490#p118490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=114968#p114968" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>ColVar := Display_CompareColors(bgr1:=&quot;&quot;, bgr2:=&quot;&quot;, variat:=&quot;&quot;)</code></pre></div><p>- параметры вызываемой ф-ии равны &quot;&quot;?.</p><div class="codebox"><pre><code>{
bgr1 := colorBGR
bgr2 := searchColorBGR
variat := 5
}</code></pre></div><p>- сначала вызываете ф-ию с пустыми параметрами, а потом присваиваете переменным, которые больше не используете, новое значение?</p><p>Поиграйтесь:</p><div class="codebox"><pre><code>MsgBox % f1(5, 2)
MsgBox % f2(3, 7, 2) &quot; c вариацией 2&quot;
MsgBox % f2(3, 5, 3) &quot; c вариацией 3&quot;
MsgBox % f2(2+3, 5)
qwert:=7, asdf:=8
MsgBox % f2(qwert, asdf:=101)
Return

f1(a, b) {
	if (a &gt; b) {
		Return % a &quot;&gt;&quot; b
	}
	Return % a &quot;&lt;&quot; b
}

f2(a, b, c:=0) {
	if Compare(a, b, c) {
		Return a &quot;~&quot; b
	}
	Return a &quot; даже близко !=&quot; b
}

Compare(haha, hoho, вариация) {
	If (Abs(haha - hoho) &lt;= вариация)
		Return true ; true синоним 1
	Return false ; синоним 0
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-04-10T02:55:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=114968#p114968</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Возможно ли получить цвет пикселя неактивного окна]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=114967#p114967" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>While (++x&lt;x2)
		{
			colorBGR := DllCall(&quot;GetPixel&quot;, &quot;UInt&quot;, hDC, &quot;Int&quot;, x, &quot;Int&quot;, y, &quot;UInt&quot;)
			; OutputDebug % &quot;[&quot; Format(&quot;{:03}&quot;,x) &quot;,&quot; Format(&quot;{:03}&quot;,y) &quot;]: &quot; Format(&quot;{:#08x}&quot;,colorBGR)
			ColVar := Display_CompareColors(bgr1:=&quot;&quot;, bgr2:=&quot;&quot;, variat:=&quot;&quot;)
			{
			bgr1 := colorBGR
			bgr2 := searchColorBGR
			variat := 5
			}
			if (ColVar = 1)
			{
				Return {x:x, y:y}
			}
		}</code></pre></div><p>На большее ума не хватило.<br />Я так полагаю Display_CompareColors() возвращает &quot;1&quot; - подходит под сравнение, &quot;0&quot; - не подходит?<br />Вот так сравниваются colorBGR и searchColorBGR: &quot;16777215 = 0x577AB9&quot;. Получается белый и коричневый. Причем colorBGR не в формате BGR.</p>]]></content>
			<author>
				<name><![CDATA[SeaVodikendu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33752</uri>
			</author>
			<updated>2017-04-10T01:46:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=114967#p114967</id>
		</entry>
</feed>
