<?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="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12786&amp;type=atom" />
	<updated>2018-12-02T16:37:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12786</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130195#p130195" />
			<content type="html"><![CDATA[<p>Это да, просто было сложно понять, какое именно значение нужно.<br />Так я методом подбора пользуюсь в таких случаях. Хотя знаю про Spy++ и подобные программ.<br />Спасибо, помогли.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2018-12-02T16:37:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130195#p130195</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130193#p130193" />
			<content type="html"><![CDATA[<p>Чтобы не мучаться с подбором можно посмотреть составляющие окна с помощью Microsoft Spy++.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-12-02T15:30:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130193#p130193</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130192#p130192" />
			<content type="html"><![CDATA[<p>Ну да, работает! А я какие только значения не подбирал.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2018-12-02T15:20:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130192#p130192</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130191#p130191" />
			<content type="html"><![CDATA[<p>Читайте GetParent, GetDlgCtrlID.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-12-02T14:58:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130191#p130191</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130190#p130190" />
			<content type="html"><![CDATA[<p>Не понимаю, так я же указал hDlg и nIDButton. Я уже много разных вариантов подбирал вместо этих значений, ничего не работает.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2018-12-02T14:55:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130190#p130190</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130189#p130189" />
			<content type="html"><![CDATA[<p>Либо неправильно определяете родительское окно, либо айди кнопки.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-12-02T14:38:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130189#p130189</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130188#p130188" />
			<content type="html"><![CDATA[<p>Пытаюсь определить состояния флажков в настройках программы Winrar.<br />Так работает:<br /></p><div class="codebox"><pre><code>BM_GETCHECK := 0xF0
BST_CHECKED := 0x1
BST_INDETERMINATE := 0x2
BST_UNCHECKED := 0x0

SendMessage, BM_GETCHECK,0,0,, ahk_id 0x002206CC
  If (errorLevel = BST_CHECKED)
 msgbox found
   else
 msgbox not found</code></pre></div><p>Так нет:<br /></p><div class="codebox"><pre><code>hDlg := &quot;0x00AA05C2&quot; ; ?
nIDButton := &quot;102&quot; ; ?

w := DllCall(&quot;IsDlgButtonChecked&quot;, &quot;Ptr&quot;, hDlg, &quot;int&quot;, nIDButton)
msgbox % w</code></pre></div><p><a href="https://docs.microsoft.com/ru-ru/windows/desktop/api/winuser/nf-winuser-isdlgbuttonchecked">https://docs.microsoft.com/ru-ru/window … tonchecked</a>.</p><p>Кто знает, почему? Заранее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2018-12-02T13:52:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130188#p130188</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117145#p117145" />
			<content type="html"><![CDATA[<p>Вот так у меня выбирает дочерний третий подпункт:<br /></p><div class="codebox"><pre><code>n := 14
nChild := 3
f1::
SendMessage, TVM_GETNEXTITEM := 0x110A, TVGN_FIRSTVISIBLE := 0x5, 0, SysTreeView321, ahk_class #32770 ahk_exe uTorrent.exe
loop % n - 1
   SendMessage, TVM_GETNEXTITEM := 0x110A, TVGN_NEXTVISIBLE := 0x6, ErrorLevel, SysTreeView321, ahk_class #32770 ahk_exe uTorrent.exe
SendMessage, TVM_GETNEXTITEM := 0x110A, TVGN_CHILD := 0x4, ErrorLevel, SysTreeView321, ahk_class #32770 ahk_exe uTorrent.exe
loop % nChild - 1
   SendMessage, TVM_GETNEXTITEM := 0x110A, TVGN_NEXTVISIBLE := 0x6, ErrorLevel, SysTreeView321, ahk_class #32770 ahk_exe uTorrent.exe
SendMessage, TVM_SELECTITEM := 0x110B, TVGN_CARET := 0x9, ErrorLevel, SysTreeView321, ahk_class #32770 ahk_exe uTorrent.exe
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-07-07T14:19:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117145#p117145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117134#p117134" />
			<content type="html"><![CDATA[<p>А он там и не должен работать.<br />Сообщения разные. В винрар:<br /><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ff486047(v=vs.85).aspx">https://msdn.microsoft.com/en-us/librar … s.85).aspx</a><br />А в юторрент:<br /><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ff486106(v=vs.85).aspx">https://msdn.microsoft.com/en-us/librar … s.85).aspx</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-07-06T23:48:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117134#p117134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117133#p117133" />
			<content type="html"><![CDATA[<p>Вы не подскажете, так работает для всех окон настроек, например, в настройках программы uTorrent такой вариант не работает:<br /></p><div class="codebox"><pre><code>SendMessage, 0x130C, 5,, SysTreeView321, Настройки ahk_class #32770 ahk_exe uTorrent.exe</code></pre></div>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-07-06T19:09:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117133#p117133</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117132#p117132" />
			<content type="html"><![CDATA[<p>Почти везде показывает.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-07-06T18:53:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117132#p117132</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117131#p117131" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>svoboden пишет:</cite><blockquote><p>Нашел, что ID в этих контролов всегда одинаковый (определил с помощью AutoIt Window Info)</p></blockquote></div><p>А AutoIt Window Info показывает это ID для всех контролов подряд?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-07-06T18:21:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117131#p117131</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117130#p117130" />
			<content type="html"><![CDATA[<p>Ну, надо проверять, одинаковые или разные у них родительские окна, может, от этого зависит ещё. Главное, что у одного и того же контрола постоянное ID. И, насколько я понимаю, его определяет разработчик, поэтому в принципе может хоть всем одинаковые раздать.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-06T18:17:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117130#p117130</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117129#p117129" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>И для каких это контролов, я вижу что у кнопок DlgCtrlID повторяются в одном окне, это только для Edit?</p></blockquote></div><p>В классе кнопок повторяются.<br />А <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms645478(v=vs.85).aspx">описание </a>какое то совсем скудное.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-07-06T18:12:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117129#p117129</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор нужного контрола]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=117128#p117128" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>EditID := 110  ; записать определённый ID

WinExist(&quot;ahk_class #32770 ahk_exe WinRAR.exe&quot;)
WinGet, List1, ControlListHwnd
Loop, parse, List1, `n, `r
{
   WinGetClass, WinClass, % &quot;ahk_id&quot; A_LoopField
   if DllCall(&quot;GetDlgCtrlID&quot;, Ptr, A_LoopField) = EditID &amp;&amp; WinClass = &quot;Edit&quot; &amp;&amp; hwnd := A_LoopField
      break
}
   
MsgBox, % &quot;hwnd = &quot; . hwnd</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-07-06T18:10:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=117128#p117128</id>
		</entry>
</feed>
