<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Замена WinWaitClose или IfWinNotExist]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=8326</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=8326&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Замена WinWaitClose или IfWinNotExist».]]></description>
		<lastBuildDate>Fri, 24 May 2013 05:18:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72403#p72403</link>
			<description><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd318066(v=vs.85).aspx">Event Constants</a></p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Fri, 24 May 2013 05:18:41 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72403#p72403</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72402#p72402</link>
			<description><![CDATA[<p>Да, так работает.<br />Спасибо!<br />А откуда вы взяли этот параметр - EVENT_OBJECT_DESTROY := 0x8001</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 24 May 2013 01:29:27 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72402#p72402</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72399#p72399</link>
			<description><![CDATA[<p>Не принял я во внимание что окно ваше дочернее, ShellProc их не все распознаёт.<br />По счёт этого тоже не уверен:</p><div class="codebox"><pre><code>

EVENT_OBJECT_DESTROY := 0x8001

SetWinEventHook(EVENT_OBJECT_DESTROY, EVENT_OBJECT_DESTROY, 0, RegisterCallback(&quot;HookProc&quot;, &quot;F&quot;), 0, 0, 0)

TargetWinId := WinExist(&quot;Безымянный — Блокнот ahk_class Notepad&quot;)  

   
HookProc(hWinEventHook, event, hwnd, idObject, idChild, dwEventThread, dwmsEventTime)
{  
    Global TargetWinId
    If (hwnd = TargetWinId)
        ToolTip % hwnd &quot;   =    &quot; TargetWinId
}

SetWinEventHook(eventMin, eventMax, hmodWinEventProc, lpfnWinEventProc, idProcess, idThread, dwFlags)
{
   return DllCall(&quot;SetWinEventHook&quot; , UInt, eventMin
                                    , UInt, eventMax
                                    , Ptr, hmodWinEventProc
                                    , Ptr, lpfnWinEventProc
                                    , UInt, idProcess
                                    , UInt, idThread
                                    , UInt, dwFlags)
}
return

</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 21:24:42 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72399#p72399</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72398#p72398</link>
			<description><![CDATA[<p>Да, не появляется.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 20:38:13 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72398#p72398</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72397#p72397</link>
			<description><![CDATA[<p>Я правильно понял что при закрытии окна Compressor... ahk_class #32770 ToolTip не появляется.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 20:34:17 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72397#p72397</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72396#p72396</link>
			<description><![CDATA[<p>А закрытие блокнота отлавливает.<br />Может окно у audacity специфическое.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 20:28:53 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72396#p72396</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72395#p72395</link>
			<description><![CDATA[<p>А блокнот</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 20:16:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72395#p72395</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72394#p72394</link>
			<description><![CDATA[<p>В смысле дальше node = 2 не идет.<br />То есть эта функция не отлавливает закрытие этого окна.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 20:13:43 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72394#p72394</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72393#p72393</link>
			<description><![CDATA[<p>Что значит зависает на&nbsp; If (nCode = 2). Как это определено?</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 20:11:31 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72393#p72393</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72392#p72392</link>
			<description><![CDATA[<p>Не понимаю.<br />Скрипт зависает на<br /> If (nCode = 2)</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 20:07:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72392#p72392</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72391#p72391</link>
			<description><![CDATA[<p>А можно продолжить отладку и смотреть какое окно убивается:<br /></p><div class="codebox"><pre><code>
DllCall(&quot;RegisterShellHookWindow&quot;, &quot;UInt&quot;, A_ScriptHwnd)
OnMessage(DllCall(&quot;RegisterWindowMessage&quot;, &quot;str&quot;, &quot;SHELLHOOK&quot;), &quot;ShellProc&quot;)

ToolTip % &quot;Id = &quot; TargetWinId := WinExist(&quot;Compressor... ahk_class #32770&quot;)

ShellProc(nCode, wParam)    {
    Global TargetWinId
    If (nCode = 2) 
        ToolTip % wParam &quot;  =?  &quot; TargetWinId 
} 
Return
</code></pre></div><p>и сделать вывод что WinExist в вашем случае определяет Id не того окна. <br />Пробовать сначала активировать окно, и получать Id как WinExist(&quot;A&quot;).<br />Если нет, то получить Id всех окон &quot;Compressor... ahk_class #32770&quot; и копать дальше.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 19:52:45 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72391#p72391</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72390#p72390</link>
			<description><![CDATA[<p>Winget показывает такой же результат.<br />Кстати хук от уважаемого teadrinker работает.<br />Только надо его как-то изменить под мои нужды.<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=65431#p65431">http://forum.script-coding.com/viewtopi … 431#p65431</a><br /></p><div class="codebox"><pre><code>EVENT_OBJECT_FOCUS := 0x8005

SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, 0, RegisterCallback(&quot;HookProc&quot;, &quot;F&quot;), 0, 0, 0)

Loop
{
   ToolTip % A_Index
   Sleep, 300
}
   
   
HookProc(hWinEventHook, event, hwnd, idObject, idChild, dwEventThread, dwmsEventTime)
{
   WinGetClass, class, A
   if (class = &quot;Notepad&quot;)
      ExitApp
}

SetWinEventHook(eventMin, eventMax, hmodWinEventProc, lpfnWinEventProc, idProcess, idThread, dwFlags)
{
   return DllCall(&quot;SetWinEventHook&quot; , UInt, eventMin
                                    , UInt, eventMax
                                    , Ptr, hmodWinEventProc
                                    , Ptr, lpfnWinEventProc
                                    , UInt, idProcess
                                    , UInt, idThread
                                    , UInt, dwFlags)
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 19:42:48 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72390#p72390</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72389#p72389</link>
			<description><![CDATA[<p>После того как получили Id проверьте нужное окно другим инструментом и сравните их Id.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 19:31:17 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72389#p72389</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72388#p72388</link>
			<description><![CDATA[<p>Не, не делал.<br />Показывает: Id = 0x43188a</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 23 May 2013 19:26:34 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72388#p72388</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена WinWaitClose или IfWinNotExist]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=72387#p72387</link>
			<description><![CDATA[<p>Вы хотя бы отладку какую-то делали?:</p><div class="codebox"><pre><code>
DllCall(&quot;RegisterShellHookWindow&quot;, &quot;UInt&quot;, A_ScriptHwnd)
OnMessage(DllCall(&quot;RegisterWindowMessage&quot;, &quot;str&quot;, &quot;SHELLHOOK&quot;), &quot;ShellProc&quot;)

ToolTip % &quot;Id = &quot; TargetWinId := WinExist(&quot;Compressor... ahk_class #32770&quot;)

ShellProc(nCode, wParam)    {
    Global TargetWinId
    If (nCode = 2)
    {    
        If (wParam = TargetWinId)
            MsgBox Close TargetWinId
    }  
} 
Return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 23 May 2013 19:21:15 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=72387#p72387</guid>
		</item>
	</channel>
</rss>
