<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Диапазон цветов]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=11118</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11118&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Диапазон цветов».]]></description>
		<lastBuildDate>Thu, 03 Dec 2015 14:14:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Диапазон цветов]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=99502#p99502</link>
			<description><![CDATA[<p>Вот так как-то:<br /></p><div class="codebox"><pre><code>#SingleInstance,Force
setbatchlines,-1
CoordMode,Pixel
CoordMode,ToolTip

colormin:=0x901020
colormax:=0xff5050
;colormin:=0x000000
;colormax:=0xffffff

f1::
if ColorsLine(100,100,colormin,colormax,&quot;x&quot;,100) ; начальная точка x=100, y=100,colormin,colormax,сканировать по x или y,сколько пикселей сканировать=100
  tooltip,Совпало
else
  tooltip,Облом.
return


ColorsLine(x,y,colormin,colormax,xy=&quot;x&quot;,count=1)
{
  loop,% count
  {
    if (a_index&gt;count)
      break
    PixelGetColor,Color,% xy=&quot;x&quot; ? x+a_index : x,% xy=&quot;y&quot; ? y+a_index : y, RGB

tooltip,% &quot;Отладка`n&quot; Color,% xy=&quot;x&quot; ? x+a_index+5 : x+5,% xy=&quot;y&quot; ? y+a_index+5 : y+5

    if !incolors(Color,colormin,colormax)
      return 0
  }
  return 1
}

incolors(Color,colormin,colormax)
{
  if (Color&amp;0xff0000&gt;(colormin&amp;0xff0000)-1 and Color&amp;0xff0000&lt;(colormax&amp;0xff0000)+1
  and Color&amp;0x00ff00&gt;(colormin&amp;0x00ff00)-1 and Color&amp;0x00ff00&lt;(colormax&amp;0x00ff00)+1
  and Color&amp;0x0000ff&gt;(colormin&amp;0x0000ff)-1 and Color&amp;0x0000ff&lt;(colormax&amp;0x0000ff)+1)
    return 1
}
</code></pre></div><p>Чтобы увеличить скорость - нужно отключить &quot;Аэро&quot;, если Win7.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Thu, 03 Dec 2015 14:14:14 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=99502#p99502</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Диапазон цветов]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=99485#p99485</link>
			<description><![CDATA[<p><strong>lukas_endigo_91</strong>, этот велосипед уже изобретён. Команды называются <em>PixelSearch</em> и <em>ImageSearch</em>.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Thu, 03 Dec 2015 06:11:52 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=99485#p99485</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Диапазон цветов]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=99478#p99478</link>
			<description><![CDATA[<p><strong>Alectric</strong><br />Спасибо, работает. Подскажите пожалуйста мне еще одну вещь. Получается данный код следит за указателям, в идеале он должен проверять горизонтальную линию из пикселей от 128px по 252px (<strong>диапазон пикселей</strong>), то есть следить за определенным участком и при совпадении <strong>&quot;диапазон цветов&quot;</strong> должен выполнить код.</p>]]></description>
			<author><![CDATA[null@example.com (lukas_endigo_91)]]></author>
			<pubDate>Wed, 02 Dec 2015 20:53:41 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=99478#p99478</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Диапазон цветов]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=99475#p99475</link>
			<description><![CDATA[<p>Вроде работает...</p><p>...</p><p>Подправил:<br /></p><div class="codebox"><pre><code>#SingleInstance,Force

colormin:=0x901020
colormax:=0xff5050

loop
{
  mousegetpos,x,y
  PixelGetColor, Color, % x, % y, RGB

  if incolors(Color,colormin,colormax)
    tooltip,% Color
}

incolors(Color,colormin,colormax)
{
  if (Color&amp;0xff0000&gt;(colormin&amp;0xff0000)-1 and Color&amp;0xff0000&lt;(colormax&amp;0xff0000)+1
  and Color&amp;0x00ff00&gt;(colormin&amp;0x00ff00)-1 and Color&amp;0x00ff00&lt;(colormax&amp;0x00ff00)+1
  and Color&amp;0x0000ff&gt;(colormin&amp;0x0000ff)-1 and Color&amp;0x0000ff&lt;(colormax&amp;0x0000ff)+1)
    return 1
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Wed, 02 Dec 2015 17:46:32 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=99475#p99475</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Диапазон цветов]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=99471#p99471</link>
			<description><![CDATA[<p>Всем доброго времени суток! Есть <strong>&quot;диапазон цветов&quot;</strong> в RGB: <br /><strong>RED = от 90 до FF;<br />GREEN = от 10 до 50;<br />BLUE = от 20 до 50.</strong><br />Получается с помощью команды:<br /></p><div class="codebox"><pre><code>PixelGetColor, dimColor, 500, 500, RGB</code></pre></div><p>Получаю цвет в переменную dimColor. К примеру в <strong>%dimColor%</strong> цвет <strong>0хA42135</strong>, это значит что он в <strong>&quot;диапазон цветов&quot;</strong> и выполняет дальше код.<br />Помогите пожалуйста как мне сделать функцию или формулу для <strong>&quot;диапазона цветов&quot;</strong>. Не обижайтесь если что не понятно и не правильно написал, объяснил как смог.</p>]]></description>
			<author><![CDATA[null@example.com (lukas_endigo_91)]]></author>
			<pubDate>Wed, 02 Dec 2015 16:23:21 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=99471#p99471</guid>
		</item>
	</channel>
</rss>
