<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10926&amp;type=atom" />
	<updated>2020-01-22T15:24:10Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10926</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=137449#p137449" />
			<content type="html"><![CDATA[<p>О, кажется подобрал:<br /></p><div class="codebox"><pre><code>SendInput, {Alt down}{shift}
Send {Alt up}
Exit </code></pre></div>]]></content>
			<author>
				<name><![CDATA[timotv]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40582</uri>
			</author>
			<updated>2020-01-22T15:24:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=137449#p137449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=137448#p137448" />
			<content type="html"><![CDATA[<p>Почему не делает? Что написано, то и делает — нажимает Alt, потом Shift (не удерживая Alt).</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-01-22T15:19:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=137448#p137448</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=137447#p137447" />
			<content type="html"><![CDATA[<p>Почему в результате выполнения следующих скрипт язык не переключается?<br /></p><div class="codebox"><pre><code>SendInput, {Alt}
SendInput, {Shift}
Exit </code></pre></div><div class="codebox"><pre><code>SendInput, {Alt shift}
Exit </code></pre></div>]]></content>
			<author>
				<name><![CDATA[timotv]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40582</uri>
			</author>
			<updated>2020-01-22T15:09:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=137447#p137447</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=137354#p137354" />
			<content type="html"><![CDATA[<p>Дайте пожалуйста простой AutoHotKey скрипт для эмуляции комбинации Alt+Shift для переключения между двумя языками : RU и EN. Мне необходимо назначить эту комбинацию на одну из дополнительных клавишь клавиатуры.</p>]]></content>
			<author>
				<name><![CDATA[timotv]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40582</uri>
			</author>
			<updated>2020-01-19T13:24:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=137354#p137354</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97311#p97311" />
			<content type="html"><![CDATA[<p>Ответьте, пожалуйста, кто-нибудь на <a href="http://forum.script-coding.com/viewtopic.php?pid=97256#p97256">сообщение</a>.</p>]]></content>
			<author>
				<name><![CDATA[4talk]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33332</uri>
			</author>
			<updated>2015-09-10T13:14:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97311#p97311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97295#p97295" />
			<content type="html"><![CDATA[<p>teadrinker, ну, скорее, наверное, размещу системные скрипты в отдельном файле. Во всяком случае, спасибо за помощь в разработке!</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2015-09-09T21:32:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97295#p97295</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97294#p97294" />
			<content type="html"><![CDATA[<p>В общем, нужно весь ваш файл смотреть. Но здесь вряд ли кому интересно. У меня в личке — только платно, от 500 р.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-09-09T21:26:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97294#p97294</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97293#p97293" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Уберите из кода Return и поставьте в начале.</p></blockquote></div><p>Убрал строку. Что именно и в начало чего ставить не понял, попробовал сценарий ставить, как и ранее, сперва в начало файла, потом в конец. Вариант из 58 поста также конфликтует в одном файле с другими скриптами. Но если ставлю его в начало скрипта, то последущая горячая клавиша для другой программы работает только частично. Отрывок из моего файла:<br /></p><div class="codebox"><pre><code>
SetTitleMatchMode 2
DetectHiddenWindows On
SetKeyDelay -1

ToggleInputMethods:

#Persistent
Global list := {&quot;Skype.exe&quot;:&quot;ru&quot;, &quot;atom.exe&quot;:&quot;en&quot;}

SetWinEventHook(EVENT_SYSTEM_FOREGROUND := 0x0003, EVENT_SYSTEM_FOREGROUND, 0, RegisterCallback(&quot;HookProc&quot;, &quot;F&quot;), 0, 0, 0)

HookProc(hWinEventHook, event, hwnd)  {
        WinGet, Process, ProcessName, ahk_id %hwnd%
        If (list.haskey(Process))  {
                ControlGetFocus, CtrlFocus, ahk_id %hwnd%
                PostMessage, WM_INPUTLANGCHANGEREQUEST := 0x50, , {&quot;en&quot;:0x409,&quot;ru&quot;:0x419}[list[Process]], %CtrlFocus%, ahk_id %hwnd%
        }
}

SetWinEventHook(eventMin, eventMax, hmodWinEventProc, lpfnWinEventProc, idProcess, idThread, dwFlags)  {
     Return DllCall(&quot;SetWinEventHook&quot;, UInt, eventMin , UInt, eventMax , Ptr, hmodWinEventProc
                        , Ptr, lpfnWinEventProc , UInt, idProcess , UInt, idThread, UInt, dwFlags, Ptr)
}

NewProgram:

#IfWinactive, ahk_exe vegas130.exe

Counts:
Count_F2 := 0

    ~F2:: ; Pause/Select Event/Select Loop
         F2:= [&quot;{F2}&quot;, &quot;+{F2}&quot;, &quot;+^{[}{vk52}&quot;], Period_F2 := 0250 ; Здесь третья переменная перестает срабатывать, при размещенном выше скрипте на автопереключение
         SendInput % F2[Count_F2 := Count_F2*((A_PriorHotkey = A_ThisHotkey)&amp;&amp;(A_TimeSincePriorHotkey&lt;Period_F2))+1]
    Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2015-09-09T21:10:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97293#p97293</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97292#p97292" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Я у себя давно так использую.</p></blockquote></div><p>А меня практически во всех программах, включая браузер, устраивает английский по умолчанию.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-09-09T19:56:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97292#p97292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97291#p97291" />
			<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-09-09T19:54:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97291#p97291</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97290#p97290" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Так и не понял.</p></blockquote></div><p>Запускаешь <a href="http://forum.script-coding.com/viewtopic.php?pid=97278#p97278">этот</a> скрипт, активируешь notepad++, переключаешь раскладку на русскую, вызываешь дочернее окно, закрываешь его — раскладка переключится на английскую.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-09-09T19:52:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97290#p97290</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97289#p97289" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>переключаешь в нём раскладку на русскую, затем вызываешь какое-либо дочернее окно — раскладка снова переключится на английскую.</p></blockquote></div><p>Я про то и говорил что дочерние проверять не лишнее. <br /></p><div class="quotebox"><blockquote><p>Может, так лучше, я просто не вдумывался в проблему особо, т. к. самому вряд ли пригодится.</p></blockquote></div><p>Я у себя давно так использую.</p><p>ап:<br /></p><div class="quotebox"><blockquote><p>В том варианте — при переходе с дочернего на родительское.</p></blockquote></div><p>А, да. тут никак, что и подтверждает несостоятельность идеи с активациями.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-09T19:49:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97289#p97289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97288#p97288" />
			<content type="html"><![CDATA[<p>Сначала не всё прочитал, отредактировал. Про переключение раскладки — запускаешь последний скрипт, активируешь notepad++, переключаешь в нём раскладку на русскую, затем вызываешь какое-либо дочернее окно — раскладка снова переключится на английскую.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-09-09T19:45:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97288#p97288</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97287#p97287" />
			<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-09-09T19:42:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97287#p97287</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переключение раскладки клавиатуры с помощью клавиш Ctrl и Shift]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97286#p97286" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Значит можно на таком варианте остановится</p></blockquote></div><p>Можно. Есть мелкий недостаток — при переходе с родительского из списка на его дочернее будет переключать раскладку, если в родительском была переключена на другую. В <a href="http://forum.script-coding.com/viewtopic.php?pid=97278#p97278">том</a> варианте — при переходе с дочернего на родительское.<br /></p><div class="quotebox"><blockquote><p>зачем проверять активации окон, а не просто их создание.</p></blockquote></div><p>Может, так лучше, я просто не вдумывался в проблему особо, т. к. самому вряд ли пригодится.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-09-09T19:39:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97286#p97286</id>
		</entry>
</feed>
