<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Определить наличие текста контрола, если его class меняется.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15838&amp;type=atom" />
	<updated>2020-11-21T08:14:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15838</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143591#p143591" />
			<content type="html"><![CDATA[<p>Если надо относительно окна, то первый верхний.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-21T08:14:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143591#p143591</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143572#p143572" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong></p><p>Подскажите пожалуйста, если AhkSpy в Get path показывает несколько строк, то какой вариант выбирается?</p><div class="codebox"><pre><code>
↓ 1.1.1.1.9  ▪ 
↓ 1.1.1.9  ▪ 
↓ 1.1.9  ▪ 
↓ 1.9  ▪ 
↓  9  ▪ </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vlad1986]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38788</uri>
			</author>
			<updated>2020-11-20T12:43:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143572#p143572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143560#p143560" />
			<content type="html"><![CDATA[<p>В принципе через WinGetText все работает. Попробую на досуге еще с Get path покопаться. Ещё раз спасибо.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-19T10:24:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143560#p143560</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143559#p143559" />
			<content type="html"><![CDATA[<p>Я вчера этот код запускал.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T09:40:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143559#p143559</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143558#p143558" />
			<content type="html"><![CDATA[<p>Значит где-то ошибка, смотреть надо.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T09:39:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143558#p143558</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143557#p143557" />
			<content type="html"><![CDATA[<p>И так не срабатывает.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-19T09:37:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143557#p143557</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143556#p143556" />
			<content type="html"><![CDATA[<p>Или так. <br /></p><div class="codebox"><pre><code>

hwnd := ChildFromPath(&quot;3.14&quot;, WinExist(&quot;ahk_class FineReader15MainWindowClass&quot;)) 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T09:32:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143556#p143556</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143555#p143555" />
			<content type="html"><![CDATA[<p>Нет. Не срабатывает.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-19T09:31:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143555#p143555</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143554#p143554" />
			<content type="html"><![CDATA[<p>Наверное есть ещё окна FineReaderOCR, попробуйте так, когда окно будет активно. </p><div class="codebox"><pre><code>
hwnd := ChildFromPath(&quot;3.14&quot;, WinExist(&quot;A&quot;)) 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T09:27:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143554#p143554</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143553#p143553" />
			<content type="html"><![CDATA[<p>Заменил строку. По прежнему пусто.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-19T09:22:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143553#p143553</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143551#p143551" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
hwnd := ChildFromPath(&quot;3.14&quot;, WinExist(&quot;ahk_exe FineReaderOCR.exe&quot;)) 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T09:11:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143551#p143551</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143550#p143550" />
			<content type="html"><![CDATA[<p>В коде в вашем последнем посте, честно говоря , не особо разобрался. Запустил скрипт. Окно MsgBox пусто.<br />На самом деле после клика по Get path в области окна Control Path две строки:<br />3.14&nbsp; ▪&nbsp; 0x03050E&nbsp; ▪&nbsp; FineReader15MainWindowClass&nbsp; ▪&nbsp; FineReaderOCR.exe <br />↓&nbsp; 14&nbsp; ▪&nbsp; 0x0109F0&nbsp; ▪&nbsp; AWL:74350000:8:10003:1900015:0:0&nbsp; ▪&nbsp; FineReaderOCR.exe<br />Вчера указал только нижнюю строку, так как именно после клика по кнопке flash на этой строке мигала рамка области, в которую входил и мой целевой контрол. Решил, что этого достаточно.<br />Числа 3.14 и 14 постоянны.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-19T08:58:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143550#p143550</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143548#p143548" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stokber пишет:</cite><blockquote><p>Путь, если я правильно понял, все же разный</p></blockquote></div><p>Нет одинаковый, 14.<br /></p><div class="quotebox"><cite>stokber пишет:</cite><blockquote><p>К сожалению ничего не нашел в сети о том, как можно воспользоваться значением Control Path.</p></blockquote></div><p>В описании есть ссылка.<br /></p><div class="codebox"><pre><code>
hwnd := ChildFromPath(14, WinExist(&quot;ahk_exe FineReaderOCR.exe&quot;)) 
ControlGetText, txt, , ahk_id %hwnd%
MsgBox %txt%

ChildFromPath(str, hwnd) 
{
	Static GW_HWNDNEXT := 2, GW_CHILD := 5
	hwnd := DllCall(&quot;GetWindow&quot;, &quot;Ptr&quot;, hwnd, UInt, GW_CHILD, &quot;Ptr&quot;)
	arr := StrSplit(str, &quot;.&quot;), off := 1, i := 1
	Loop 
	{
		If (i = arr[off])
		{
			If (off = arr.Count())
				return hwnd
			hwnd := DllCall(&quot;GetWindow&quot;, &quot;Ptr&quot;, hwnd, UInt, GW_CHILD, &quot;Ptr&quot;), ++off, i := 1 
		}
		Else If (++i) &amp;&amp; !(hwnd := DllCall(&quot;GetWindow&quot;, &quot;Ptr&quot;, hwnd, UInt, GW_HWNDNEXT, &quot;Ptr&quot;))
			return   
	}
} 

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-19T00:59:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143548#p143548</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143544#p143544" />
			<content type="html"><![CDATA[<p>Решил свою задачу с помощью подсказанной вами команды WinGetText. <br />Путь, если я правильно понял, все же разный. После клика по Get path в области окна Control Path следующее:<br />1-й запуск:<br />↓&nbsp; 14&nbsp; ▪&nbsp; 0x0109D6&nbsp; ▪&nbsp; AWL:740B0000:8:10003:1900015:0:0&nbsp; ▪&nbsp; FineReaderOCR.exe<br />2-й запуск:<br />↓&nbsp; 14&nbsp; ▪&nbsp; 0x0804B4&nbsp; ▪&nbsp; AWL:741C0000:8:10003:1900015:0:0&nbsp; ▪&nbsp; FineReaderOCR.exe<br />К сожалению ничего не нашел в сети о том, как можно воспользоваться значением Control Path.</p>]]></content>
			<author>
				<name><![CDATA[stokber]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40788</uri>
			</author>
			<updated>2020-11-18T19:10:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143544#p143544</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Определить наличие текста контрола, если его class меняется.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143542#p143542" />
			<content type="html"><![CDATA[<p>Если я вам помог, отпишитесь всегда ли путь одинаковый, нужна статистика.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-18T18:01:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143542#p143542</id>
		</entry>
</feed>
