<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Дезактивация работы скрипта в поле своего окна]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=9274</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9274&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Дезактивация работы скрипта в поле своего окна».]]></description>
		<lastBuildDate>Thu, 24 Aug 2017 20:00:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118765#p118765</link>
			<description><![CDATA[<p>Да, действительно, так оно и есть.<br />Тогда на этот случай надо еще, как писал <strong>stealzy</strong> проверять состояние окна.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 24 Aug 2017 20:00:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118765#p118765</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118764#p118764</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>нажимаешь {LAlt Down}{Escape}{LAlt Up}</p></blockquote></div><p>Окно должно деактивироватся.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:53:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118764#p118764</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118760#p118760</link>
			<description><![CDATA[<p>Сворачиваешь <span class="bbu">несколько</span> окон, ативируешь одно из них, нажимаешь {LAlt Down}{Escape}{LAlt Up}, смотришь хэндл, нажимаешь {LWin Down}{Up}{LWin Up}, смотришь хэндл. Хэндлы одинаковые.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:36:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118760#p118760</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118759#p118759</link>
			<description><![CDATA[<p>У меня твой код открывает блокнот, потом показываеи его хендл, потом максимизирует.<br />Проверь с помощью 17 кода хендлы разные или нет.<br />Если разные, то и окна разные.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:32:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118759#p118759</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118753#p118753</link>
			<description><![CDATA[<p>Показывает что окно хоть и свёрнуто но считается активным, ввод {LWin Down}{Up}{LWin Up} идёт опять же в это окно.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:15:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118753#p118753</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118752#p118752</link>
			<description><![CDATA[<p>Я не совсем понимаю, что твой код показывает.<br />Я проверял так:<br />Нажимал f11 при развернутой программе, потом сворачивал и нажимал снова.<br />Результат был постоянно разным.<br /></p><div class="codebox"><pre><code>f11::
WinGet, t ,id, A
tooltip %t%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:10:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118752#p118752</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118750#p118750</link>
			<description><![CDATA[<p>Как другое, если WinGet, h ,id, A возвращает хэндл окна.<br /></p><div class="codebox"><pre><code>WinMinimizeAll
run notepad
Sleep 2222
Send {LAlt Down}{Escape}{LAlt Up}
Sleep 1111
Wingettitle t, A
WinGetclass,c, A
WinGet, h ,id, A
tooltip % t &quot;`n&quot; c &quot;`n&quot; h
Sleep 1111
Send {LWin Down}{Up}{LWin Up}
Sleep 1111
Wingettitle t, A
WinGetclass,c, A
WinGet, h ,id, A
tooltip % t &quot;`n&quot; c &quot;`n&quot; h
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:04:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118750#p118750</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118749#p118749</link>
			<description><![CDATA[<p>Я имел в виду, то что при сворачивании окна активным становится другое окно - его иконка.<br /></p><div class="quotebox"><blockquote><p>For a typical application, the system draws an icon, called the class icon, when the window is minimized, labeling the icon with the name of the window. The class icon, a static image that represents the application, is specified by the application when it registers the window class. The application assigns a handle to the class icon to the hIcon member of WNDCLASS before calling RegisterClass. The application can use the LoadIcon function to retrieve the icon handle.</p></blockquote></div><p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd145059(v=vs.85).aspx">https://msdn.microsoft.com/en-us/librar … s.85).aspx</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 24 Aug 2017 19:02:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118749#p118749</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118746#p118746</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Активным становится другое окно, просто название его не меняется, а хендл и класс да.</p></blockquote></div><p>Не до конца понял, ты утверждаешь что свёрнутое окно не может быть активным?<br /></p><div class="codebox"><pre><code>WinMinimizeAll
run notepad
Sleep 2222
Send {LAlt Down}{Escape}{LAlt Up}
Sleep 1111
Wingettitle t, A
WinGetclass,c, A
WinGet, h ,id, A
tooltip % t &quot;`n&quot; c &quot;`n&quot; h
Sleep 2222
Send {LWin Down}{Up}{LWin Up}
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Thu, 24 Aug 2017 18:07:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118746#p118746</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118713#p118713</link>
			<description><![CDATA[<p>Спасибо большое&nbsp; <strong>Malcev</strong> , то что нужно. Вот так это выглядит.<br /></p><div class="codebox"><pre><code>Gui, +hwndhGui +AlwaysOnTop -Caption +ToolWindow +LastFound
;WinGet, ID
;WinSet TransColor, EEAA99
;Gui, Color, EEAA99
gui, font, s12 
Gui, Add, Text , cFF8000 vStatic1 x0 y0, Ru
Gui, Add, Text , cFF8000 vStatic2 x0 y0, En

DetectHiddenWindows, on
loop
{
oldlang:=lang
   lang:=InputLayout()
if (oldlang!=lang)
   If (lang = &quot;Russian&quot;)
   {
GuiControl, hide, static2
    GuiControl, Show, static1 
}
   Else If (lang = &quot;English&quot;)
   {
GuiControl, hide, static1
      GuiControl, Show, static2
}
   IfWinActive ahk_class Chrome_WidgetWin_1
      Gui, Show, x95 y39 w20 h20 NA, lang053
   else
Gui Submit, Hide
    ;  WinHide lang053 
   sleep, 50
}


InputLayout()
{
    WinGetClass, Class, % &quot;ahk_id&quot; hID := WinExist(&quot;A&quot;)
     if !id := DllCall(&quot;GetWindow&quot;, Ptr, hid, UInt, GW_OWNER := 4, Ptr)
      id:=hID
    ThreadID := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Int&quot;, id, &quot;Int&quot;, 0)
    HKL := DllCall(&quot;GetKeyboardLayout&quot;, &quot;uint&quot;, ThreadID, &quot;UShort&quot;)
    VarSetCapacity(sKbd, 260, 0)
    DllCall(&quot;GetLocaleInfo&quot;, &quot;uint&quot;, HKL
                           , &quot;uint&quot;, 0x1001
                           , &quot;str&quot;,  sKbd
                           , &quot;uint&quot;, 260)
    Return sKbd
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Wed, 23 Aug 2017 20:54:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118713#p118713</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118708#p118708</link>
			<description><![CDATA[<p>Активным становится другое окно, просто название его не меняется, а хендл и класс да.<br /></p><div class="codebox"><pre><code>f11::
;  wingettitle t, A
  WinGetclass ,t, A
; WinGet, t ,id, A
  tooltip %t%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 23 Aug 2017 19:36:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118708#p118708</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118701#p118701</link>
			<description><![CDATA[<p><strong>Malcev</strong>, взято из опыта, сам спотыкался, но сейчас проверил основательнее.<br />Если имеем на столе только одно несвернутое окно, то при его сворачивании оно может остаться активным, если есть тултип.<br />Иначе активной становится Start ahk_class Button.<br /></p><div class="codebox"><pre><code>loop {
  sleep 500
  wingettitle t, A
  tooltip % t
  ; outputdebug % t
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (stealzy)]]></author>
			<pubDate>Wed, 23 Aug 2017 18:32:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118701#p118701</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118670#p118670</link>
			<description><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Окно остается активным при сворачивании.</p></blockquote></div><p>А разве такое возможно?<br /></p><div class="codebox"><pre><code>DetectHiddenWindows, on
loop
{
   IfWinActive ahk_class Chrome_WidgetWin_1
      tooltip active
   else
      tooltip noactive
   sleep, 50
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 23 Aug 2017 09:59:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118670#p118670</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118665#p118665</link>
			<description><![CDATA[<p>Почему неправильно? Окно остается активным при сворачивании.<br />Добавьте условие на состояние окна - WinGet State.</p>]]></description>
			<author><![CDATA[null@example.com (stealzy)]]></author>
			<pubDate>Wed, 23 Aug 2017 03:29:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118665#p118665</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Дезактивация работы скрипта в поле своего окна]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118662#p118662</link>
			<description><![CDATA[<p>Доброго времени суток. Сделал скрипт на индикацию раскладки клавиатуры. Нужно что бы он показывал раскладку клавиатуры только в &quot;Google Chrome&quot;. Использовал функцию (IfWinActive) , работает но как то неправильно . Окно &quot;Gui &quot; показывается только в &quot;Google Chrome&quot; , работает исправно но при сворачивании &quot;Google Chrome&quot; остаётся висеть на рабочем столе. Помогите исправить.<br /></p><div class="codebox"><pre><code>DetectHiddenWindows, on

Gui, +hwndhGui +AlwaysOnTop -Caption +ToolWindow +LastFound
;WinGet, ID
;WinSet TransColor, EEAA99
;Gui, Color, EEAA99
gui, font, s12 
Gui, Add, Text , cFF8000 vStatic1 x0 y0, Ru
Gui, Add, Text , cFF8000 vStatic2 x0 y0, En

loop

IfWinActive ahk_class Chrome_WidgetWin_1
{
oldlang:=lang
   lang:=InputLayout()
if (oldlang!=lang)
   If (lang = &quot;Russian&quot;)
   {
GuiControl, hide, static2
    GuiControl, Show, static1 
Gui, Show, x95 y39 w20 h20 NA, lang053
   }
   Else If (lang = &quot;English&quot;)
   {
GuiControl, hide, static1
      GuiControl, Show, static2
Gui, Show, x95 y39 w20 h20 NA, lang053
}
sleep, 50
}

InputLayout()
{
    WinGetClass, Class, % &quot;ahk_id&quot; hID := WinExist(&quot;A&quot;)
     if !id := DllCall(&quot;GetWindow&quot;, Ptr, hid, UInt, GW_OWNER := 4, Ptr)
      id:=hID
    ThreadID := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Int&quot;, id, &quot;Int&quot;, 0)
    HKL := DllCall(&quot;GetKeyboardLayout&quot;, &quot;uint&quot;, ThreadID, &quot;UShort&quot;)
    VarSetCapacity(sKbd, 260, 0)
    DllCall(&quot;GetLocaleInfo&quot;, &quot;uint&quot;, HKL
                           , &quot;uint&quot;, 0x1001
                           , &quot;str&quot;,  sKbd
                           , &quot;uint&quot;, 260)
    Return sKbd
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Tue, 22 Aug 2017 20:59:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118662#p118662</guid>
		</item>
	</channel>
</rss>
