<?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=17531&amp;type=atom" />
	<updated>2023-01-06T12:09:50Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17531</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обратный слэш вводит разные слэши в разных раскладках.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156196#p156196" />
			<content type="html"><![CDATA[<p>Спасибо большое, скрипт идеально работает.</p>]]></content>
			<author>
				<name><![CDATA[Lortrum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41040</uri>
			</author>
			<updated>2023-01-06T12:09:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156196#p156196</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Обратный слэш вводит разные слэши в разных раскладках.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156155#p156155" />
			<content type="html"><![CDATA[<p>Попробуйте так:<br /></p><div class="codebox"><pre><code>#If GetLocale() = &quot;ru&quot;
 \:: Send {Text}/
+\:: Send {Text}\
#If

GetLocale() {
   ThreadID := DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;Ptr&quot;, WinExist(&quot;A&quot;), &quot;Ptr&quot;, 0)
   Return {0x409: &quot;en&quot;, 0x419: &quot;ru&quot;}[DllCall(&quot;GetKeyboardLayout&quot;, &quot;UInt&quot;, ThreadID) &amp; 0xFFFF]
}</code></pre></div><div class="quotebox"><cite>Lortrum пишет:</cite><blockquote><p>скрипт пытается запустить себя сам вместо того чтобы ввести символ.</p></blockquote></div><p>Для предотвращения такого поведения читайте #UseHook.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-12-31T15:06:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156155#p156155</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Обратный слэш вводит разные слэши в разных раскладках.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156154#p156154" />
			<content type="html"><![CDATA[<p>С наступающим вас!</p><p>Есть цель, чтобы в русской раскладке клавиша &quot;обратный слэш&quot; вводила обычный слэш, и с шифтом вводила обратный, а в английской раскладке ничего бы не менялось. Как такое сделать?</p><p>Пока-что есть такая наработка:</p><div class="codebox"><pre><code>;0x4090409 - ENG
;0x4190419 - RUS
\::
  SetFormat, Integer, H
  WinGet, WinID,, A
  ThreadID:=DllCall(&quot;GetWindowThreadProcessId&quot;, &quot;UInt&quot;, WinID, &quot;UInt&quot;, 0)
  InputLocaleID:=DllCall(&quot;GetKeyboardLayout&quot;, &quot;UInt&quot;, ThreadID, &quot;UInt&quot;)
  ;MsgBox, %InputLocaleID%

  If InputLocaleID = 0x4090409
    ;MsgBox, ENG
    Send, \
  If InputLocaleID = 0x4190419
    ;MsgBox, RUS
    Send, /
Return</code></pre></div><p>но в ней обратный слэш в английской раскладке не срабатывает. Видимо, скрипт пытается запустить себя сам вместо того чтобы ввести символ.</p>]]></content>
			<author>
				<name><![CDATA[Lortrum]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41040</uri>
			</author>
			<updated>2022-12-31T14:36:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156154#p156154</id>
		</entry>
</feed>
