<?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=5578&amp;type=atom" />
	<updated>2014-10-24T16:50:10Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=5578</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87701#p87701" />
			<content type="html"><![CDATA[<p>Тогда не знаю, скорее всего никак.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-24T16:50:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87701#p87701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87696#p87696" />
			<content type="html"><![CDATA[<p>Не подходит.</p>]]></content>
			<author>
				<name><![CDATA[Pogodin]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30956</uri>
			</author>
			<updated>2014-10-24T07:20:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87696#p87696</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87691#p87691" />
			<content type="html"><![CDATA[<p>Можно попробовать в конце добавить:<br /></p><div class="codebox"><pre><code>WinSet, Redraw,, [title]   ; указать title</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-23T14:13:57Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87691#p87691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=87688#p87688" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Для перекрытого окна (современный метод <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />):</p></blockquote></div><p>&nbsp; &nbsp;Спасибо, отлично работает. Но, если часто повторять это действие, то окно которое сканируется, при изменениях внутри него или при изменении его размера, покрывается артефактами. Приходится заставлять его перерисовываться сворачиванием-разворачиванием или накрытием-закрытием.</p><p>&nbsp; Можно как-то избежать появления артефактов?</p>]]></content>
			<author>
				<name><![CDATA[Pogodin]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30956</uri>
			</author>
			<updated>2014-10-23T12:18:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=87688#p87688</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=62598#p62598" />
			<content type="html"><![CDATA[<p>Каким &quot;таким&quot;? Написать свою функцию, используя GDI+ возможно, но достаточно трудоёмко. Можно поискать на оф. форуме.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2012-08-09T13:18:08Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=62598#p62598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=62588#p62588" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Для перекрытого окна (современный метод <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />):<br /></p><div class="codebox"><pre><code>F11::
   Title =   ; указать заголовок окна
   x =       ; указать координаты пиксела
   y =  

   pToken := Gdip_Startup()
      
   hWnd := WinExist(Title)
   pBitmap := Gdip_BitmapFromHWND(hWnd)
   SetFormat, IntegerFast, H
   ARGB := Gdip_GetPixel(pBitmap, x, y)
   Gdip_DisposeImage(pBitmap), Gdip_Shutdown(pToken)

   MsgBox, % &quot;Red = &quot; (ARGB &amp; 0xffffff) &gt;&gt; 16
         . &quot;`nGreen = &quot; (ARGB &amp; 0xffff) &gt;&gt; 8
         . &quot;`nBlue = &quot; ARGB &amp; 0xff
   Return</code></pre></div><p>Требует наличия <a href="http://www.autohotkey.net/~tic/Gdip.ahk">Gdip.ahk</a> в <a href="http://www.autohotkey.com/docs/Functions.htm#lib">пользовательской библиотеке</a> (папка Мои документы\AutoHotkey\Lib\).</p></blockquote></div><p>А поиск картинок таким путём можно осуществить?</p>]]></content>
			<author>
				<name><![CDATA[Pokerist]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24990</uri>
			</author>
			<updated>2012-08-09T11:29:32Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=62588#p62588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46916#p46916" />
			<content type="html"><![CDATA[<p><strong>CyberMage</strong>, ссылка не битая, просто ведёт в закрытый от просмотра «Архив». Я поднял тему обратно в «Разработку…». Пробуйте ссылку ещё раз.</p><p><span style="color: Green">Пишите по-русски: намеренное коверканье слов чревато последствиями.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-03-26T08:58:55Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46916#p46916</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46906#p46906" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>OFF: Нашёл, что искал — старая подобная тема: <a href="http://forum.script-coding.com/viewtopic.php?id=506">AutoHotkey: Возможно ли получить цвет пикселя неактивного окна</a>.</p></blockquote></div><p><span style="color: Green"><strong>Косяк…</strong></span> <span style="color: Green"><strong>Д</strong></span>анная ссылка битая<span style="color: Green"><strong>.</strong></span></p>]]></content>
			<author>
				<name><![CDATA[CyberMage]]></name>
			</author>
			<updated>2011-03-26T05:33:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46906#p46906</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46102#p46102" />
			<content type="html"><![CDATA[<p>OFF: </p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Это оказалось невозможным, <a href="http://msdn.microsoft.com/en-us/library/ms633544%28VS.85%29.aspx">ибо</a>:<br /></p><div class="quotebox"><blockquote><p><strong>Remarks</strong></p><p>If the information specified in WINDOWPLACEMENT would result in a window that is completely off the screen, the <span style="color: red">system will automatically adjust the coordinates</span> so that the window is visible...</p></blockquote></div></blockquote></div><p>Хе-хе-хе <img src="//forum.script-coding.com/img/smilies/lol.png" width="15" height="15" />…</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-03-12T01:11:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46102#p46102</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46101#p46101" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>* задать положение/размеры для обычного состояния окна так, чтобы оно оказывалось за пределами видимости экрана;</p></blockquote></div><p>Это оказалось невозможным, <a href="http://msdn.microsoft.com/en-us/library/ms633544%28VS.85%29.aspx">ибо</a><br /></p><div class="quotebox"><blockquote><p><strong>Remarks</strong></p><p>If the information specified in WINDOWPLACEMENT would result in a window that is completely off the screen, the system will automatically adjust the coordinates so that the window is visible...</p></blockquote></div><p>Для перекрытого окна (современный метод <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />):<br /></p><div class="codebox"><pre><code>F11::
   Title =   ; указать заголовок окна
   x =       ; указать координаты пиксела
   y =  

   pToken := Gdip_Startup()
      
   hWnd := WinExist(Title)
   pBitmap := Gdip_BitmapFromHWND(hWnd)
   SetFormat, IntegerFast, H
   ARGB := Gdip_GetPixel(pBitmap, x, y)
   Gdip_DisposeImage(pBitmap), Gdip_Shutdown(pToken)

   MsgBox, % &quot;Red = &quot; (ARGB &amp; 0xffffff) &gt;&gt; 16
         . &quot;`nGreen = &quot; (ARGB &amp; 0xffff) &gt;&gt; 8
         . &quot;`nBlue = &quot; ARGB &amp; 0xff
   Return</code></pre></div><p>Требует наличия <a href="http://www.autohotkey.net/~tic/Gdip.ahk">Gdip.ahk</a> в <a href="http://www.autohotkey.com/docs/Functions.htm#lib">пользовательской библиотеке</a> (папка Мои документы\AutoHotkey\Lib\).</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-03-11T23:56:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46101#p46101</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46099#p46099" />
			<content type="html"><![CDATA[<p>OFF: Нашёл, что искал — старая подобная тема: <a href="http://forum.script-coding.com/viewtopic.php?id=506">AutoHotkey: Возможно ли получить цвет пикселя неактивного окна</a>.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-03-11T22:46:13Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46099#p46099</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46098#p46098" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>Насколько я понимаю — это бред.</p></blockquote></div><p>Почему, если эта свёртка-развёртка ни на что не повлияет (разворачивать можно, не активируя). Попробую. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-03-11T22:11:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46098#p46098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46097#p46097" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p><strong>teadrinker</strong>, <strong>YMP</strong>: можно ли узнать у минимизированного окна какие координаты у него были в не минимизированном, «обычном» состоянии?</p></blockquote></div><p>Размеры так:<br /></p><div class="codebox"><pre><code>hWnd =    ; указать хэндл

NumPut(VarSetCapacity(WPT, 44), WPT)
DllCall(&quot;GetWindowPlacement&quot;, UInt, hWnd, UInt, &amp;WPT)

x_top_left := NumGet(WPT, 28), y_top_left := NumGet(WPT, 32)
x_bottom_right := NumGet(WPT, 36), y_bottom_right := NumGet(WPT, 40)

MsgBox, % &quot;X = &quot; x_top_left &quot;`nY = &quot; y_top_left 
   . &quot;`nW = &quot; x_bottom_right - x_top_left &quot;`nH = &quot; y_bottom_right - y_top_left
Return</code></pre></div><div class="quotebox"><cite>shoroh пишет:</cite><blockquote><p>Подскажите в каком направлении двигаться, т.е. какими функциями это можно сделать.</p></blockquote></div><p>Напишу попозже.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2011-03-11T22:05:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46097#p46097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46096#p46096" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Хотя да, размеры, возможно, тоже в реестре. Но точно не знаю.</p></blockquote></div><p>Вопрос был задан в предположении, что если возможно определять и <em>задавать</em> положение/размеры не минимизированного окна (в минимизированном состоянии), то:<br />* получить у минимизированного окна его положение/размеры в обычном состоянии;<br />* задать положение/размеры для обычного состояния окна так, чтобы оно оказывалось за пределами видимости экрана;<br />* восстановить окно;<br />* получить цвет пикселя;<br />* свернуть окно;<br />* вернуть сохранённые положение/размеры окна для обычного состояния.</p><p>Насколько я понимаю — это бред.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-03-11T22:04:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46096#p46096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Можно ли определить цвет пикселя в свернутом окне.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=46094#p46094" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Получить цвет пикселя перекрытого окна — не проблема.</p></blockquote></div><p>Да мне такой вариант подходит. Подскажите в каком направлении двигаться, т.е. какими функциями это можно сделать.</p>]]></content>
			<author>
				<name><![CDATA[shoroh]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26766</uri>
			</author>
			<updated>2011-03-11T21:44:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=46094#p46094</id>
		</entry>
</feed>
