<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: AHK не видит цвет]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16417&amp;type=atom" />
	<updated>2021-07-09T12:10:47Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=16417</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: AHK не видит цвет]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148913#p148913" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code> PixelSearch,,, 800, 450, 800, 450, % Color, 10, RGB</code></pre></div><p>Как вариант искать не точный цвет, а учитывать вариации. С цифрой надо пробовать какой вариант больше подходит. Прицел в игре может быть хоть немного прозрачным и от заднего фона будет зависить его тон. <br />Как сказано в документации:</p><p>PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID , <strong>Variation</strong>, Mode<br /><strong>Variation</strong><br /></p><div class="quotebox"><blockquote><p>A number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of the color (can be an expression). For example, if 2 is specified and ColorID is 0x444444, any color from 0x424242 to 0x464646 will be considered a match. This parameter is helpful if the color sought is not always exactly the same shade. If you specify 255 shades of variation, all colors will match. The default is 0 shades.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2021-07-09T12:10:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148913#p148913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: AHK не видит цвет]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148621#p148621" />
			<content type="html"><![CDATA[<p>Тут не площадь нужно увеличивать а понимать как код себя ведёт в тех или иный условиях. Чтобы было проще нужно читать справку.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-06-27T09:59:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148621#p148621</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: AHK не видит цвет]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148611#p148611" />
			<content type="html"><![CDATA[<p>Попробуй увеличить площадь поиска</p>]]></content>
			<author>
				<name><![CDATA[sptrap]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41837</uri>
			</author>
			<updated>2021-06-26T18:57:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148611#p148611</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: AHK не видит цвет]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148345#p148345" />
			<content type="html"><![CDATA[<p>В кратце проблема такая.<br />Сам бот написан как &quot;Триггер&quot;. То есть прицел изначально белый, но когда наводишь на человека он становится красным, в этот момент если зажат LShift он должен нажимать на ЛКМ(выстрел). В целом все работает, но цвет в который красится прицел AHK просто не видит. При чем если поставить цвет красный(FFFF00) то его видит, тестил на красном квадрате в фотошопе, точно так же с цветом db4949 уже не работает, его бот просто не замечает. Может кто понял ошибку или что то такое, может можо заменить ImageSearch, или выбрать диапазон тонов цвета. В общем я уже запутался.<br /></p><div class="codebox"><pre><code>;Указать цвет срабатывания (Hex, RGB):
Color = 0xdb4949

;Авто-выстрел при удержании клавиши:
~LShift::
While GetKeyState(&quot;LShift&quot;, &quot;P&quot;)
{
 PixelSearch,,, 800, 450, 800, 450, % Color,, RGB
 If !ErrorLevel
 {
  MouseClick
  ToolTip -Выстрел-,0,0
 }
 Else
  ToolTip, Не найден %Color% цвет,0,0
 Sleep, 500
}
ToolTip
Return</code></pre></div><p>И еще может можно несколько цветов указать, так как там не 1 цвет а сразу несколько его оттенков или тонов.</p>]]></content>
			<author>
				<name><![CDATA[YrukZ]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41787</uri>
			</author>
			<updated>2021-06-07T17:28:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148345#p148345</id>
		</entry>
</feed>
