<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK:Смена языка на Японский кнопкой CapsLock]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14230</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14230&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK:Смена языка на Японский кнопкой CapsLock».]]></description>
		<lastBuildDate>Thu, 11 Oct 2018 05:40:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[AHK:Смена языка на Японский кнопкой CapsLock]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=129150#p129150</link>
			<description><![CDATA[<p>По задумке язык должен переключаться на Японский нажатием CapsLock.А alt+shift переключать en-ru.Ничего не работает...Может кто-нибудь исправить мой говнокод?</p><div class="codebox"><pre><code>ru := DllCall(&quot;LoadKeyboardLayout&quot;, &quot;Str&quot;, &quot;0x4190419&quot;, &quot;Int&quot;, 1)
en := DllCall(&quot;LoadKeyboardLayout&quot;, &quot;Str&quot;, &quot;0x4090409&quot;, &quot;Int&quot;, 1)
jp := DllCall(&quot;LoadKeyboardLayout&quot;, &quot;Str&quot;, &quot;0x4110411&quot;, &quot;Int&quot;, 1)

CapsLock::
{
    PostMessage 0x50, 0, %jp%,, A
}

!~Shift UP::
{
    if GetKeyState(&quot;Alt&quot;) {
	    w := DllCall(&quot;GetForegroundWindow&quot;)
		pid := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;UInt&quot;, w, &quot;Ptr&quot;, 0)
		l :=DllCall(&quot;GetKeyboardLayout&quot;, &quot;Uint&quot;, pid)
		if (l = en) {
		        PostMessage 0x50, 0, %ru%,, A
		} else {
		    PostMessage 0x50, 0, %en%,, A
		}
		Exit
    }
}

~LAlt UP::
{
    if GetKeyState(&quot;Shift&quot;) {
        w := DllCall(&quot;GetForegroundWindow&quot;)
		pid := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Uint&quot;, w, &quot;Ptr&quot;, 0)
		l :=DllCall(&quot;GetKeyboardLayout&quot;, &quot;UInt&quot;, pid)
		if (l = en) {
		    PostMessage 0x50, 0, %ru%,, A
		} else {
            PostMessage 0x50, 0, %en%,, A	
		}
		Exit
	}
}	</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (gurutaminoviy)]]></author>
			<pubDate>Thu, 11 Oct 2018 05:40:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=129150#p129150</guid>
		</item>
	</channel>
</rss>
