<?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=10856&amp;type=atom" />
	<updated>2015-08-09T12:34:06Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10856</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96358#p96358" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong> молодца! Вот то, что нужно было:<br /></p><div class="codebox"><pre><code>
ShowWindow(WinExist(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;), 1, 1)

ShowWindow(hwnd, x=&quot;&quot;, y=&quot;&quot;, w=&quot;&quot;, h=&quot;&quot;) {  
  DllCall(&quot;ShowWindow&quot;, &quot;ptr&quot;, hwnd, &quot;Int&quot;, 4) ; SW_SHOWNOACTIVATE=4
  WinMove, % &quot;ahk_id&quot; hwnd, , % x, % y, % w, % h  
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-09T12:34:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96358#p96358</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96354#p96354" />
			<content type="html"><![CDATA[<p>А нет, все в порядке вроде.<br /></p><div class="codebox"><pre><code>showWin(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;)

showWin(win,x=0,y=0,w=600,h=400)
{
  hwnd:=WinExist(&quot;A&quot;)
  WinExist(win)
  WinSet, ExStyle, +0x08000000 ; WS_EX_NOACTIVATE
  winset,AlwaysOnTop,on
  DllCall(&quot;ShowWindow&quot;, &quot;ptr&quot;,WinExist(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;), &quot;Int&quot;, 4) ; SW_SHOWNOACTIVATE=4
  WinMove, , ,% x,% y,% w,% h
  WinSet, ExStyle, -0x08000000
  winset,AlwaysOnTop,off
}
</code></pre></div><p><span style="color: #eeeeee">Опять глюки, да что ж такое то сегодня... И опять мультипост.</span></p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-08-09T09:40:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96354#p96354</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96353#p96353" />
			<content type="html"><![CDATA[<p>Больше ничем не могу помочь, могу только &quot;костыли&quot; писать.</p><br /><p>...<br />Может через <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms633548(v=vs.85).aspx">ShowWindow function</a>?</p><p>...<br />Попробовал с параметром &quot;SW_SHOWNOACTIVATE&quot;, все равно активируется.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-08-09T09:22:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96353#p96353</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96352#p96352" />
			<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>2015-08-09T09:19:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96352#p96352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96351#p96351" />
			<content type="html"><![CDATA[<p>Тогда такой странный метод:<br /></p><div class="codebox"><pre><code>h:=WinExist(&quot;A&quot;)
WinExist(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;)
WinSet, ExStyle, +0x08000000 ; WS_EX_NOACTIVATE
winset,AlwaysOnTop,on
winrestore
WinMove, , , 5, 5, 555, 555
WinSet, ExStyle, -0x08000000
winactivatebottom,% &quot;ahk_id &quot; h
winset,AlwaysOnTop,off
Return
</code></pre></div><p>Оформил в функцию:<br /></p><div class="codebox"><pre><code>
showWin(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;)

showWin(win,x=0,y=0,w=600,h=400)
{
  hwnd:=WinExist(&quot;A&quot;)
  WinExist(win)
  WinSet, ExStyle, +0x08000000 ; WS_EX_NOACTIVATE
  winset,AlwaysOnTop,on
  winrestore
  WinMove, , ,% x,% y,% w,% h
  WinSet, ExStyle, -0x08000000
  winactivatebottom,% &quot;ahk_id &quot; hwnd
  winset,AlwaysOnTop,off
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-08-09T09:15:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96351#p96351</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96348#p96348" />
			<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>2015-08-09T09:02:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96348#p96348</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96337#p96337" />
			<content type="html"><![CDATA[<p>Забыли про &quot;WinRestore&quot;:<br /></p><div class="codebox"><pre><code>WinExist(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;)
; WinGetPos, x, y, W, H
; ToolTip % x &quot;|&quot; y &quot;|&quot; W &quot;|&quot; H
WinSet, ExStyle, +0x08000000 ; WS_EX_NOACTIVATE
winrestore
WinMove, , , 5, 5, 555, 555
WinSet, ExStyle, -0x08000000
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-08-09T03:37:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96337#p96337</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Показать свёрнутое окно не активируя его]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96334#p96334" />
			<content type="html"><![CDATA[<p>Может не вижу чего то лежащего на поверхности, не соображу как показать свёрнутое окно стороннего приложения, не активируя его, и желательно сразу в заданных координатах.</p><p>В принципе не активировать можно так:<br /></p><div class="codebox"><pre><code>WinExist(&quot;ahk_class Notepad ahk_exe notepad.exe&quot;)
; WinGetPos, x, y, W, H 
; ToolTip % x &quot;|&quot; y &quot;|&quot; W &quot;|&quot; H
WinSet, ExStyle, +0x08000000 ; WS_EX_NOACTIVATE
WinMove, , , 5, 5, 555, 555
WinSet, ExStyle, -0x08000000
Return</code></pre></div><p>Но размеры не задаются, окно появляется в минимальном размере, а хотелось бы прежние размеры до сворачивания.<br />Со своим окном всё просто:<br /></p><div class="codebox"><pre><code>Gui, Show, w333 h333
Return

1::Gui, Show, Noactivate x1 y1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-08T22:47:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96334#p96334</id>
		</entry>
</feed>
