<?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=9566&amp;type=atom" />
	<updated>2014-05-04T16:11:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9566</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82656#p82656" />
			<content type="html"><![CDATA[<p>Спасибо за ответы. Всё отлично работает.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-05-04T16:11:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82656#p82656</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82637#p82637" />
			<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>2014-05-04T05:21:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82637#p82637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82636#p82636" />
			<content type="html"><![CDATA[<p>Присвоение InputLocaleID у Вас за циклом.<br />Получается, что язык определяется один раз, а потом каждые 100 мс проверяется, что за язык. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[многобанофф]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31830</uri>
			</author>
			<updated>2014-05-04T04:44:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82636#p82636</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82635#p82635" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>hWnd := WinExist(&quot;A&quot;)
ThreadID := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Ptr&quot;, hWnd, &quot;UInt&quot;, 0, &quot;Ptr&quot;)
InputLocaleID := DllCall(&quot;GetKeyboardLayout&quot;, &quot;Ptr&quot;, ThreadID, &quot;Ptr&quot;)

Loop
{
sleep, 100

If (InputLocaleID = 0x4090409)
    X = 2
Else If (InputLocaleID = 0x4190419)
    X = 1
Else
    X = 0

}
return

1::
MsgBox, X = %X%
return</code></pre></div><p>Что-то не так.. Можете отослать код с комментариями, чтобы разобраться в нем?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-05-04T04:38:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82635#p82635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82634#p82634" />
			<content type="html"><![CDATA[<p>Каждую миллисекунду — слишком часто. Определить язык активного окна можно так:<br /></p><div class="codebox"><pre><code>
hWnd := WinExist(&quot;A&quot;)
ThreadID := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Ptr&quot;, hWnd, &quot;UInt&quot;, 0, &quot;Ptr&quot;)
InputLocaleID := DllCall(&quot;GetKeyboardLayout&quot;, &quot;Ptr&quot;, ThreadID, &quot;Ptr&quot;)
If (InputLocaleID = 0x4090409)
    X = 2
Else If (InputLocaleID = 0x4190419)
    X = 1
Else
    X = 0
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-05-04T02:46:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82634#p82634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как узнать язык окна и задать его в переменную]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=82633#p82633" />
			<content type="html"><![CDATA[<p>Задача: если в окне язык английский, то переменная Х должна равняться 2, если язык стал русский, то Х=1. Проверка должна быть каждую милисекунду. Как это сделать?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-05-04T00:56:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=82633#p82633</id>
		</entry>
</feed>
