<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; JSCript: Определить активное окно?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7811&amp;type=atom" />
	<updated>2012-11-29T20:31:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7811</id>
		<entry>
			<title type="html"><![CDATA[Re: JSCript: Определить активное окно?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=66301#p66301" />
			<content type="html"><![CDATA[<p>Не уверен, что это сильно поможет, раз уж вы уже нашли способ, но всё же. Есть возможность определить активное окно с помощью WINAPI. Но нужно установить DynamicWrapperX.<br /><a href="http://script-coding.com/dynwrapx.html">http://script-coding.com/dynwrapx.html</a><br />Пример, который выводит Хэндл активного окна.<br /></p><div class="codebox"><pre><code>DX = new ActiveXObject(&quot;DynamicWrapperX&quot;);
DX.Register(&quot;user32&quot;, &quot;GetForegroundWindow&quot;, &quot;r=h&quot;);
WScript.Echo(DX.GetForegroundWindow());</code></pre></div><p>UPD: Конечно, на одном хэндле далеко не уедешь. Этот пример выводит название активного окна:<br /></p><div class="codebox"><pre><code>DX = new ActiveXObject(&quot;DynamicWrapperX&quot;);
DX.Register(&quot;user32&quot;, &quot;GetForegroundWindow&quot;, &quot;r=h&quot;);
DX.Register(&quot;user32&quot;, &quot;GetWindowTextW&quot;, &quot;i=hpl&quot;, &quot;r=h&quot;);
//WScript.Sleep(2000); // это было для теста, в реальных условиях ждать не обязательно
hwnd = DX.GetForegroundWindow();
sptr = DX.Space(255);
DX.GetWindowTextW(hwnd, sptr, 255);
title = DX.StrGet(sptr);
WScript.Echo(title);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vo1ty]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28909</uri>
			</author>
			<updated>2012-11-29T20:31:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=66301#p66301</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JSCript: Определить активное окно?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=66200#p66200" />
			<content type="html"><![CDATA[<p>Да alexii, спасибо, уже реализовал именно так.<br />Просто нужно было удостоверится, вдруг я что то упустил.</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2012-11-27T02:53:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=66200#p66200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JSCript: Определить активное окно?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=66189#p66189" />
			<content type="html"><![CDATA[<p><strong>DnsIs</strong>, можете разве что использовать объект «AutoItX3.Control» (<a href="http://www.script-coding.com/AutiItX.html">Обзор библиотеки AutoItX3.dll</a>).</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-11-26T18:27:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=66189#p66189</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JSCript: Определить активное окно?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=66172#p66172" />
			<content type="html"><![CDATA[<p>Нету.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2012-11-26T11:03:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=66172#p66172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[JSCript: Определить активное окно?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=66171#p66171" />
			<content type="html"><![CDATA[<p>Доброго дня.</p><p>Есть в WSH аналог функции WinActive из AutoIT3?</p><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[DnsIs]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26282</uri>
			</author>
			<updated>2012-11-26T09:43:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=66171#p66171</id>
		</entry>
</feed>
