<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11454&amp;type=atom" />
	<updated>2020-11-06T08:47:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11454</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143213#p143213" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p> поддерживает любые языки, чем ваш вариант проще?</p></blockquote></div><p> <br />Надо было уточнить что он проще для чтения и понимания для меня ибо в регулярках я не особо разбираюсь, но надо будет почитать документацию регулярок.</p>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2020-11-06T08:47:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143213#p143213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143143#p143143" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Было бы неплохо.</p></blockquote></div><p>В стандартном не получится.<br /></p><div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Думаю нужно просто перейти на сохранение в сканкодах</p></blockquote></div><p>Это и сделано в 7 посте.<br /></p><div class="quotebox"><cite>__Михаил__ пишет:</cite><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>2020-11-04T22:07:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143143#p143143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143142#p143142" />
			<content type="html"><![CDATA[<p><strong>pro100andrik94</strong></p><p>Немного дополнил.</p><div class="codebox"><pre><code>Rus := [&quot;ё&quot;,&quot;й&quot;,&quot;ц&quot;,&quot;у&quot;,&quot;к&quot;,&quot;е&quot;,&quot;н&quot;,&quot;г&quot;,&quot;ш&quot;,&quot;щ&quot;,&quot;з&quot;,&quot;х&quot;,&quot;ъ&quot;,&quot;ф&quot;,&quot;ы&quot;,&quot;в&quot;,&quot;а&quot;,&quot;п&quot;,&quot;р&quot;,&quot;о&quot;,&quot;л&quot;,&quot;д&quot;,&quot;ж&quot;,&quot;э&quot;,&quot;я&quot;,&quot;ч&quot;,&quot;с&quot;,&quot;м&quot;,&quot;и&quot;,&quot;т&quot;,&quot;ь&quot;,&quot;б&quot;,&quot;ю&quot;]
Eng := [&quot;sc29&quot;,&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;y&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;sc1A&quot;,&quot;sc1B&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;sc27&quot;,&quot;sc28&quot;,&quot;z&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;sc33&quot;,&quot;sc34&quot;]
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-11-04T21:28:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143142#p143142</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143140#p143140" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong></p><p>Было бы неплохо. Думаю нужно просто перейти на сохранение в сканкодах. На данный момент использую &#039;буквенное&#039; сохранение для хоткеев. Но если язык ввода русский будут видны буквы - &#039;ж&#039;, &#039;э&#039;, &#039;б&#039;, &#039;ю&#039;, при том с нижним регистром.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-11-04T21:23:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143140#p143140</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143139#p143139" />
			<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>2020-11-04T21:03:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143139#p143139</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143138#p143138" />
			<content type="html"><![CDATA[<p>Тоже интересует, как можно при получении клавиши от &#039;Gui Add, Hotkey&#039; убрать русские символы, быстро и надёжно. Пытался при запуске программы менять язык ввода, но не успевает измениться или ещё что-то. Делал проверку через цикл - оказалось вообще не меняет язык:</p><div class="codebox"><pre><code>F2::
Name = Testing...
Gui 2: Color, % Color
Gui 2: Add ,Text, x10 y10, Загрузка данных...
Gui 2: Show,W200 H100, % Name


Loop, 1000
{
 A_Lang := InputLayout(Name)
 If A_Lang = Russian
; If !(A_Lang = &quot;English&quot;)
 {
  ToolTip, Смена языка ввода: [Rus] --&gt; [Eng]`nПопытка номер: %A_Index% %A_Lang% ,0,-100
  PostMessage, 0x50,, 0x4090409,, A	; [Eng]
;  PostMessage, 0x50, 2,,, A  ; Переключить язык.
  Sleep, 100
 }
 Else
  Break
 Sleep, 100
}
Return


;21:55 14.08.2019	Функция определения языка ввода (если не указано окно - текущее)
;If InputLayout() = Russian
InputLayout(window := &quot;A&quot;) {
   If !(hWnd := WinExist(window))
      Return
   WinGetClass, Class
   if (Class == &quot;ConsoleWindowClass&quot;){
       WinGet, consolePID, PID
       DllCall(&quot;AttachConsole&quot;, Ptr, consolePID)
       VarSetCapacity(buff, 16)
       DllCall(&quot;GetConsoleKeyboardLayoutName&quot;, Str, buff),
       DllCall(&quot;FreeConsole&quot;)
       langID := &quot;0x&quot; . SubStr(buff, -3)
   }
   Else langID := DllCall(&quot;GetKeyboardLayout&quot;, Ptr, DllCall(&quot;GetWindowThreadProcessId&quot;, Ptr, hWnd, UInt, 0, Ptr), Ptr) &amp; 0xFFFF
   Size := (DllCall(&quot;GetLocaleInfo&quot;, UInt, langID, UInt, 0x1001, UInt, 0, UInt, 0) * 2)   ; LOCALE_SENGLANGUAGE := 0x1001
   VarSetCapacity(localeSig, Size, 0)
   DllCall(&quot;GetLocaleInfo&quot;, UInt, langID, UInt, 0x1001, Str, localeSig, UInt, Size)
   Return localeSig
}
</code></pre></div><p>Как только меняю фокус на другое окно, то сразу меняет в нём язык.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-11-04T19:34:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143138#p143138</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143130#p143130" />
			<content type="html"><![CDATA[<p>Метод из 7 поста:<br /></p><div class="codebox"><pre><code>FormatHotkey(Hotkey) {
	RegExMatch(Hotkey, &quot;S)^([\^\+!]*)(.*?)$&quot;, K)
	If (StrLen(K2) = 1)
		Return K1 . Format(&quot;sc{:X}&quot;, GetKeySC(K2))
	Return Hotkey
} </code></pre></div><p>поддерживает любые языки, чем ваш вариант проще?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-11-04T11:50:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143130#p143130</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=143128#p143128" />
			<content type="html"><![CDATA[<p>Вот сам недавно столкнулся с такой проблемой и наткнулся на эту ветку но методы тут слишком &quot;сложные&quot; для реализации такой простой задачи. Может быть кто наткнется на ветку и ему прийдет по душе такой вариант. Вариант очень простой и для этой задачи хорошо подходит.<br /></p><div class="codebox"><pre><code>Rus := [&quot;й&quot;,&quot;ц&quot;,&quot;у&quot;,&quot;к&quot;,&quot;е&quot;,&quot;н&quot;,&quot;г&quot;,&quot;ш&quot;,&quot;щ&quot;,&quot;з&quot;,&quot;х&quot;,&quot;ъ&quot;,&quot;ф&quot;,&quot;ы&quot;,&quot;в&quot;,&quot;а&quot;,&quot;п&quot;,&quot;р&quot;,&quot;о&quot;,&quot;л&quot;,&quot;д&quot;,&quot;ж&quot;,&quot;э&quot;,&quot;я&quot;,&quot;ч&quot;,&quot;с&quot;,&quot;м&quot;,&quot;и&quot;,&quot;т&quot;,&quot;ь&quot;,&quot;б&quot;,&quot;ю&quot;]
Eng := [&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;y&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;[&quot;,&quot;]&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;;&quot;,&quot;&#039;&quot;,&quot;z&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;,&quot;,&quot;.&quot;]
Hotkey1 := &quot;привет&quot;
loop % Rus.Length()
{
    Hotkey1 := StrReplace(Hotkey1, Rus[A_Index], Eng[A_Index])
}
msgbox % Hotkey1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[pro100andrik94]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39412</uri>
			</author>
			<updated>2020-11-04T09:10:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=143128#p143128</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121102#p121102" />
			<content type="html"><![CDATA[<p>Понятненько ...<br />Еще раз большое спасибо за участие!</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2017-11-12T19:49:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121102#p121102</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121100#p121100" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>А куда готовый код выкладывать, если что???</p></blockquote></div><p>В смысле? В свою тему конечно.<br /></p><div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>Но он затерялся на форуме</p></blockquote></div><p>По вашему что не на первой странице, то потеряно? Поиском найдут, поднимут тему.<br /></p><div class="quotebox"><cite>freeZer0K пишет:</cite><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>2017-11-12T19:46:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121100#p121100</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121098#p121098" />
			<content type="html"><![CDATA[<p>Я по-быстрому протестировал, потому лезть в незнакомый код - время нужно.<br />Спасибо Вам за код!</p><p>А куда готовый код выкладывать, если что???<br />Я тут на форуме выложил RegFile2Ahk конвертер:<br /><a href="http://forum.script-coding.com/viewtopic.php?id=12249">http://forum.script-coding.com/viewtopic.php?id=12249</a></p><p>Но он затерялся на форуме ... Просил потестить, может ошибки какие найдутся или улучшения ...</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2017-11-12T19:39:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121098#p121098</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121097#p121097" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>Слишком быстро MsgBox сваливает - трудно поймать</p></blockquote></div><p>Ну если надо для тестирования, то</p><div class="codebox"><pre><code>MsgBox, , , % A_ThisLabel &quot;`n&quot; A_ThisHotkey, 0.3</code></pre></div><p>0.3 на 1 можно поменять.<br /></p><div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>Да, намана теперь все сканит!</p></blockquote></div><p>Спасибо за тестирование.<br /></p><div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>Хороший код и правильно считывает все коды. Переделывать не хочется.<br />Еще немного, и допишу. Потом процесс допиливания начнется ..</p><p>Идею по написанию такого скрипта могу подарить, я не жадный. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Думаю, многим пригодится, особенно игроманам.</p></blockquote></div><p>Ждём ваш вариант.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-11-12T19:31:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121097#p121097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121096#p121096" />
			<content type="html"><![CDATA[<p>Слишком быстро MsgBox сваливает - трудно поймать <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Здесь код определяется как sc56</p><p>Около Enter sc2B , похоже правильно.</p><p>Да, намана теперь все сканит! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2017-11-12T19:18:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121096#p121096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121095#p121095" />
			<content type="html"><![CDATA[<p>Так код вам зачем?<br />Назначьте в двух полях разные \, закройте окно, нажмите \, должен быть MsgBox.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-11-12T19:12:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121095#p121095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI Hotkey - при смене раскладки видим "is not a valid key name"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=121094#p121094" />
			<content type="html"><![CDATA[<p>Пробовал, но он не показывает коды, а только определяет клавиши.</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2017-11-12T19:10:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=121094#p121094</id>
		</entry>
</feed>
