<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: ClassNN контрола по координатам]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9096&amp;type=atom" />
	<updated>2014-01-18T17:29:51Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=9096</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79310#p79310" />
			<content type="html"><![CDATA[<p>Например, если текущий контрол находится полностью в рамках (размерах) или внутри предыдущего подходящего,<br />или если вектор (от левого верхнего угла окна до центра контрола) короче предыдущего, и один из краёв входит в рамки предыдущего:<br /></p><div class="codebox"><pre><code>
        if (!update_it) 
        { 
            rect_found_left:=NumGet(lParam+8,0,&quot;int&quot;), rect_found_right:=NumGet(lParam+8,8,&quot;int&quot;) 
            rect_found_top:=NumGet(lParam+8,4,&quot;int&quot;), rect_found_bottom:=NumGet(lParam+8,12,&quot;int&quot;) 
            if (rect_left &gt;= rect_found_left &amp;&amp; rect_right &lt;= rect_found_right 
                &amp;&amp; rect_top &gt;= rect_found_top &amp;&amp; rect_bottom &lt;= rect_found_bottom) 
                update_it := true 
            else if (distance &lt; NumGet(lParam+28,0,&quot;double&quot;) 
                &amp;&amp; (rect_found_left &lt; rect_left || rect_found_right &gt; rect_right 
                 || rect_found_top &lt; rect_top || rect_found_bottom &gt; rect_bottom)) 
                 update_it := true 
        } 
</code></pre></div><p>то он считается подходящим. Такая вот логика, но не на все случаи <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-18T17:29:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79310#p79310</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79308#p79308" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>По какому признаку 1 код отбрасывает SysTabControl325 который идёт дальше в Z порядке и подходит по координатам?</p></blockquote></div><p>Не знаю. Тогда, помнится, я разобрался, как этот код работает, но теперь всё уже забыл.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-18T16:20:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79308#p79308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79306#p79306" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ТС пишет:</cite><blockquote><p>Вариант с получением списка всех контролов, извлечением их координат и определением что они находятся в нужной точке, по многим причинам не подходит.</p></blockquote></div><p>Немного подумав, мне показалось что принцип эдинтичен, тому что мне пришло в голову перед созданием темы:<br /></p><div class="codebox"><pre><code>
Gui, Add, Edit, x5 y5 w110 h111, Edit 1
Gui, Add, Edit, wp hp xp yp, Edit 2
Gui, Add, Edit, wp hp xp+55 yp, Edit 3
Gui, Add, Edit, wp hp xp yp, Edit 4 
Gui, Show 

2::   
    MouseGetPos, X, Y
    ToolTip % GetClassNN2( X, Y, WinExist(&quot;A&quot;))   
    Return 
    
GetClassNN2(X, Y, Wnd)   { 
    WinGet, List, ControlListHwnd, ahk_id %Wnd%    
    Loop, parse, List, `n
    { 
        If !DllCall(&quot;IsWindowVisible&quot;, &quot;uint&quot;, A_LoopField) 
            Continue
        ControlGetPos, cX, cY, cW, cH, , ahk_id %A_LoopField% 
        If (cX &lt;= X &amp;&amp; cY &lt;= Y &amp;&amp; cX+cW &gt;= X &amp;&amp; cY+cH &gt;= Y) 
            i := A_Index
    } 
    If !i 
        Return 0 
    WinGet, List, ControlList, ahk_id %Wnd%
    Return StrSplit(List,&quot;`n&quot;)[i]
} 
</code></pre></div><p>Но только до этого я не знал про IsWindowVisible и отбрасывал только hidden контролы, а также выходил из цикла при первом &quot;попадании&quot; в координаты.</p><p>На первый взгляд коды работают одинаково, но если контролы накладываются друг на друга то в этом месте 1 код (Lexikos&#039;а) показывает нижний в Z порядке Edit2, мой код - Edit4 (ну это понятно). Также заметил в Notepad++ - 1 код правильно определяет Scintilla1, мой код в этом месте выдаёт SysTabControl325.</p><p>По какому признаку 1 код отбрасывает SysTabControl325 который идёт дальше в Z порядке и подходит по координатам?попадании</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-18T15:16:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79306#p79306</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79253#p79253" />
			<content type="html"><![CDATA[<p>Огромное спасибо! Оставил пока в таком виде:<br /></p><div class="codebox"><pre><code>
1::   
    MouseGetPos, X, Y
    Global HW := WinExist(&quot;A&quot;) 
    HC := ControlIdFromPoint( X, Y)  
    ToolTip % GetClassNN(HC) 
    Return 
 
 
ControlIdFromPoint(X, Y) 
{ 
    static EnumChildFindPointProc=0 
    if !EnumChildFindPointProc 
        EnumChildFindPointProc := RegisterCallback(&quot;EnumChildFindPoint&quot;,&quot;Fast&quot;)   
    VarSetCapacity(rect, 16) 
    DllCall(&quot;GetWindowRect&quot;,&quot;uint&quot;,HW,&quot;uint&quot;,&amp;rect) 
    VarSetCapacity(pah, 36, 0) 
    NumPut(X + NumGet(rect,0,&quot;int&quot;), pah,0,&quot;int&quot;) 
    NumPut(Y + NumGet(rect,4,&quot;int&quot;), pah,4,&quot;int&quot;) 
    DllCall(&quot;EnumChildWindows&quot;,&quot;uint&quot;,HW,&quot;uint&quot;,EnumChildFindPointProc,&quot;uint&quot;,&amp;pah)  
    return NumGet(pah,24) 
} 
 
EnumChildFindPoint(aWnd, lParam) 
{ 
    if !DllCall(&quot;IsWindowVisible&quot;,&quot;uint&quot;,aWnd) 
        return true  
    VarSetCapacity(rect, 16) 
    if !DllCall(&quot;GetWindowRect&quot;,&quot;uint&quot;,aWnd,&quot;uint&quot;,&amp;rect) 
        return true 
    pt_x:=NumGet(lParam+0,0,&quot;int&quot;), pt_y:=NumGet(lParam+0,4,&quot;int&quot;) 
    rect_left:=NumGet(rect,0,&quot;int&quot;), rect_right:=NumGet(rect,8,&quot;int&quot;) 
    rect_top:=NumGet(rect,4,&quot;int&quot;), rect_bottom:=NumGet(rect,12,&quot;int&quot;) 
    if (pt_x &gt;= rect_left &amp;&amp; pt_x &lt;= rect_right &amp;&amp; pt_y &gt;= rect_top &amp;&amp; pt_y &lt;= rect_bottom) 
    { 
        center_x := rect_left + (rect_right - rect_left) / 2 
        center_y := rect_top + (rect_bottom - rect_top) / 2 
        distance := Sqrt((pt_x-center_x)**2 + (pt_y-center_y)**2) 
        update_it := !NumGet(lParam+24) 
        if (!update_it) 
        { 
            rect_found_left:=NumGet(lParam+8,0,&quot;int&quot;), rect_found_right:=NumGet(lParam+8,8,&quot;int&quot;) 
            rect_found_top:=NumGet(lParam+8,4,&quot;int&quot;), rect_found_bottom:=NumGet(lParam+8,12,&quot;int&quot;) 
            if (rect_left &gt;= rect_found_left &amp;&amp; rect_right &lt;= rect_found_right 
                &amp;&amp; rect_top &gt;= rect_found_top &amp;&amp; rect_bottom &lt;= rect_found_bottom) 
                update_it := true 
            else if (distance &lt; NumGet(lParam+28,0,&quot;double&quot;) 
                &amp;&amp; (rect_found_left &lt; rect_left || rect_found_right &gt; rect_right 
                 || rect_found_top &lt; rect_top || rect_found_bottom &gt; rect_bottom)) 
                 update_it := true 
        } 
        if (update_it) 
        { 
            NumPut(aWnd, lParam+24) 
            DllCall(&quot;RtlMoveMemory&quot;,&quot;uint&quot;,lParam+8,&quot;uint&quot;,&amp;rect,&quot;uint&quot;,16) 
            NumPut(distance, lParam+28, 0, &quot;double&quot;) 
        } 
    } 
    return true 
}

    
GetClassNN(HC)   {      
    WinGetClass, CL, ahk_id %HC%   
    WinGet, List, ControlList, ahk_id %HW%
    Loop, parse, List, `n
    {
        If InStr(A_LoopField, CL)
        {
            ControlGet, id, Hwnd, , %A_LoopField%, ahk_id %HW% 
            If (id = HC)
                Return A_LoopField
        }
    } 
    Return False
} 
</code></pre></div><p>Что интересно, оказалось что FindWindowEx&nbsp; &quot;не знает&quot; про многие контролы, например ListView:</p><div class="codebox"><pre><code>
GetClassNN(HC)   {      
    WinGetClass, CL, ahk_id %HC%    
    While HA := DllCall(&quot;FindWindowEx&quot;, UInt,HW, UInt,HA, UInt,&amp;CL, UInt,0) 
        If (HA = HC)
            Return CL . A_Index 
    Return False
}
</code></pre></div><p>Заменил на <em>WinGet, List, ControlList</em></p><p>Совсем немного сократил ControlNNFromPoint, но не смог EnumChildFindPoint, если вы знаете что ненужного можно вычеркнуть, подскажите.<br />--- </p><p>Что ж, всё пока супер, координаты задаются относительно окна и контрол <strong>определяется даже в свёрнутом окне</strong>!</p><p>--- </p><div class="quotebox"><blockquote><p>С порядком контролов вообще не всё понятно. Вот пример ниже. Когда окно создаётся, сверху вроде бы Edit5. Но если щёлкнуть в нём мышью, там оказывается Edit1. Или просто вывести поверх другое окно — тот же эффект.</p></blockquote></div><p>Угу, но продолжает определяться MouseGetPos и этой функцией как Edit5. Но при запуске скрипта ControlFocus сразу определяет Edit1.<br />Если сделать так:<br /></p><div class="codebox"><pre><code>
Gui, Add, Edit, x5 y5 w111 h111, Edit 1
Gui, Add, Edit, wp hp xp yp, Edit 2
Gui, Add, Edit, wp hp xp yp, Edit 3
Gui, Add, Edit, wp hp xp yp, Edit 4
Gui, Add, Edit, wp vEdit hp xp yp, Edit 5
GuiControl, Focus, Edit 
Gui, Show   
</code></pre></div><p>ControlFocus определяет Edit5, но при клике всё тоже самое.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-16T20:06:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79253#p79253</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79250#p79250" />
			<content type="html"><![CDATA[<p>Что касается определения хэндла верхнего контрола, то я нашёл у себя функцию, написанную когда-то Lexikos&#039;ом. Судя по примечанию, алгоритм взят из исходников AutoHotkey, по кр. мере callback-функция. Попробуйте разобраться, а я спать пошёл, уже голова не работает. <br /></p><div class="codebox"><pre><code>
; Retrieves the control at the specified point. 
; X         [in]    X-coordinate relative to the top-left of the window. 
; Y         [in]    Y-coordinate relative to the top-left of the window. 
; WinTitle  [in]    Title of the window whose controls will be searched. 
; WinText   [in] 
; cX        [out]   X-coordinate relative to the top-left of the control. 
; cY        [out]   Y-coordinate relative to the top-left of the control. 
; ExcludeTitle [in] 
; ExcludeText  [in] 
; Return Value:     The hwnd of the control if found, otherwise the hwnd of the window.
 
ControlFromPoint(X, Y, WinTitle=&quot;&quot;, WinText=&quot;&quot;, ByRef cX=&quot;&quot;, ByRef cY=&quot;&quot;, ExcludeTitle=&quot;&quot;, ExcludeText=&quot;&quot;) 
{ 
    static EnumChildFindPointProc=0 
    if !EnumChildFindPointProc 
        EnumChildFindPointProc := RegisterCallback(&quot;EnumChildFindPoint&quot;,&quot;Fast&quot;) 
    
    if !(target_window := WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText)) 
        return false 
    
    VarSetCapacity(rect, 16) 
    DllCall(&quot;GetWindowRect&quot;,&quot;uint&quot;,target_window,&quot;uint&quot;,&amp;rect) 
    VarSetCapacity(pah, 36, 0) 
    NumPut(X + NumGet(rect,0,&quot;int&quot;), pah,0,&quot;int&quot;) 
    NumPut(Y + NumGet(rect,4,&quot;int&quot;), pah,4,&quot;int&quot;) 
    DllCall(&quot;EnumChildWindows&quot;,&quot;uint&quot;,target_window,&quot;uint&quot;,EnumChildFindPointProc,&quot;uint&quot;,&amp;pah) 
    control_window := NumGet(pah,24) ? NumGet(pah,24) : target_window 
    DllCall(&quot;ScreenToClient&quot;,&quot;uint&quot;,control_window,&quot;uint&quot;,&amp;pah) 
    cX:=NumGet(pah,0,&quot;int&quot;), cY:=NumGet(pah,4,&quot;int&quot;) 
    return control_window 
} 

; Ported from AutoHotkey::script2.cpp::EnumChildFindPoint() 
EnumChildFindPoint(aWnd, lParam) 
{ 
    if !DllCall(&quot;IsWindowVisible&quot;,&quot;uint&quot;,aWnd) 
        return true 
    VarSetCapacity(rect, 16) 
    if !DllCall(&quot;GetWindowRect&quot;,&quot;uint&quot;,aWnd,&quot;uint&quot;,&amp;rect) 
        return true 
    pt_x:=NumGet(lParam+0,0,&quot;int&quot;), pt_y:=NumGet(lParam+0,4,&quot;int&quot;) 
    rect_left:=NumGet(rect,0,&quot;int&quot;), rect_right:=NumGet(rect,8,&quot;int&quot;) 
    rect_top:=NumGet(rect,4,&quot;int&quot;), rect_bottom:=NumGet(rect,12,&quot;int&quot;) 
    if (pt_x &gt;= rect_left &amp;&amp; pt_x &lt;= rect_right &amp;&amp; pt_y &gt;= rect_top &amp;&amp; pt_y &lt;= rect_bottom) 
    { 
        center_x := rect_left + (rect_right - rect_left) / 2 
        center_y := rect_top + (rect_bottom - rect_top) / 2 
        distance := Sqrt((pt_x-center_x)**2 + (pt_y-center_y)**2) 
        update_it := !NumGet(lParam+24) 
        if (!update_it) 
        { 
            rect_found_left:=NumGet(lParam+8,0,&quot;int&quot;), rect_found_right:=NumGet(lParam+8,8,&quot;int&quot;) 
            rect_found_top:=NumGet(lParam+8,4,&quot;int&quot;), rect_found_bottom:=NumGet(lParam+8,12,&quot;int&quot;) 
            if (rect_left &gt;= rect_found_left &amp;&amp; rect_right &lt;= rect_found_right 
                &amp;&amp; rect_top &gt;= rect_found_top &amp;&amp; rect_bottom &lt;= rect_found_bottom) 
                update_it := true 
            else if (distance &lt; NumGet(lParam+28,0,&quot;double&quot;) 
                &amp;&amp; (rect_found_left &lt; rect_left || rect_found_right &gt; rect_right 
                 || rect_found_top &lt; rect_top || rect_found_bottom &gt; rect_bottom)) 
                 update_it := true 
        } 
        if (update_it) 
        { 
            NumPut(aWnd, lParam+24) 
            DllCall(&quot;RtlMoveMemory&quot;,&quot;uint&quot;,lParam+8,&quot;uint&quot;,&amp;rect,&quot;uint&quot;,16) 
            NumPut(distance, lParam+28, 0, &quot;double&quot;) 
        } 
    } 
    return true 
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T16:47:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79250#p79250</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79249#p79249" />
			<content type="html"><![CDATA[<p>В случае с Tab ом вообще не видит контролы:<br /></p><div class="codebox"><pre><code>
Gui, Add, Tab, , 1|2
Gui, Tab, 1
Gui, Add, Edit, w111 h111, Edit 1

Gui, Tab, 2
Gui, Add, Edit, w111 h111, Edit 2
Gui, Show 
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-16T15:57:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79249#p79249</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79248#p79248" />
			<content type="html"><![CDATA[<p>Со всеми остальными контролами также:<br /></p><div class="codebox"><pre><code>
Gui, Add, Progress, w111 h111 
Gui, Add, Progress, wp hp xp yp 
Gui, Show 
return
</code></pre></div><p>Очевидно что WindowFromPoint совсем не то. Но как то MouseGetPos всегда определяет верхний...</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-16T15:44:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79248#p79248</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79246#p79246" />
			<content type="html"><![CDATA[<p>С порядком контролов вообще не всё понятно. Вот пример ниже. Когда окно создаётся, сверху вроде бы Edit5. Но если щёлкнуть в нём мышью, там оказывается Edit1. Или просто вывести поверх другое окно — тот же эффект.<br /></p><div class="codebox"><pre><code>
Gui, Add, Edit, w111 h111, Edit 1
Gui, Add, Edit, wp hp xp yp, Edit 2
Gui, Add, Edit, wp hp xp yp, Edit 3
Gui, Add, Edit, wp hp xp yp, Edit 4
Gui, Add, Edit, wp hp xp yp, Edit 5
Gui, Show 
return

GuiClose:
    ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T15:32:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79246#p79246</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79245#p79245" />
			<content type="html"><![CDATA[<p>Насчёт статиков в описании есть оговорка.<br /></p><div class="quotebox"><blockquote><p>If the point is over a static text control, the return value is a handle to the window under the static text control.</p></blockquote></div><p>Так что странно, что вообще что-то возвращает.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T15:17:53Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79245#p79245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79243#p79243" />
			<content type="html"><![CDATA[<p>Запустите это:<br /></p><div class="codebox"><pre><code>
Gui, Add, Text, w111 h111, Static 1
Gui, Add, Text, wp hp xp yp, Static 2
Gui, Add, Text, wp hp xp yp, Static 3
Gui, Add, Text, wp hp xp yp, Static 4
Gui, Add, Text, wp hp xp yp, Static 5
Gui, Show 
return
</code></pre></div><p>Потом свой код, что возвращает?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-16T14:39:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79243#p79243</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79241#p79241" />
			<content type="html"><![CDATA[<p>У меня возвращает верхний.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T14:33:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79241#p79241</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79240#p79240" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?pid=78892#p78892">Уже было</a>, и &quot;проще&quot;.<br />WindowFromPoint возвращает <span class="bbu">нижний</span> контрол.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-01-16T14:17:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79240#p79240</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79237#p79237" />
			<content type="html"><![CDATA[<p>Вот так у меня показывает ClassNN по координатам.<br /></p><div class="codebox"><pre><code>
pEnumChildProc := RegisterCallback(&quot;EnumChildProc&quot;, &quot;Fast&quot;)

F11::
    CoordMode, Mouse, Screen
    MouseGetPos, mX, mY
    mX &amp;= 0x00000000FFFFFFFF
    Point := mX | mY&lt;&lt;32
    hWnd := DllCall(&quot;WindowFromPoint&quot;, &quot;int64&quot;, Point, &quot;ptr&quot;)
    WinGetClass, Class, ahk_id %hWnd%
    ClassNN := &quot;&quot;, NN := 0
    hwndRoot := DllCall(&quot;GetAncestor&quot;, &quot;ptr&quot;, hWnd, &quot;uint&quot;, 2, &quot;ptr&quot;) ; GA_ROOT
    DllCall(&quot;EnumChildWindows&quot;, &quot;ptr&quot;, hwndRoot, &quot;ptr&quot;, pEnumChildProc, &quot;ptr&quot;, 0)
    MsgBox, %ClassNN%
Return

EnumChildProc(hwndChild)
{
    global hWnd, Class, ClassNN, NN
    WinGetClass, Class1, ahk_id %hwndChild%
    If (Class1 = Class) {
        ++NN
        If (hwndChild = hWnd) {
            ClassNN := Class . NN
            Return False
        }
    }
    Return True
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T11:35:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79237#p79237</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79234#p79234" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Ну если в данной стадии, то проблема в получении хэндла верхнего контрола в заданных координатах.</p></blockquote></div><p>А WindowFromPoint разве не этот хэндл возвращает?</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T09:14:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79234#p79234</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: ClassNN контрола по координатам]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=79231#p79231" />
			<content type="html"><![CDATA[<p>Никак, наверно. Это же доступ через COM, зачем тут хэндлы?</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-01-16T07:33:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=79231#p79231</id>
		</entry>
</feed>
