<?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=12355&amp;type=atom" />
	<updated>2022-05-16T11:17:13Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12355</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153217#p153217" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Попробуйте вместо Sendinput, %name%<br /></p><div class="codebox"><pre><code>SendInput, {Text}%name%</code></pre></div></blockquote></div><p>Ура! Все получилось. Неделю мучился, перебирал кодировки ) Спасибо большое !!!</p>]]></content>
			<author>
				<name><![CDATA[folko989]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42531</uri>
			</author>
			<updated>2022-05-16T11:17:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153217#p153217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153216#p153216" />
			<content type="html"><![CDATA[<p>Попробуйте вместо Sendinput, %name%<br /></p><div class="codebox"><pre><code>SendInput, {Text}%name%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-05-15T21:17:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153216#p153216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153214#p153214" />
			<content type="html"><![CDATA[<p>Добрый вечер!<br />Не стал плодить темы. Подскажите пожалуйста по возможности.<br />Есть код:<br /></p><div class="codebox"><pre><code>ComObjError(False) 
Path = B:\test1\test.xlsx
Xl := ComObjCreate(&quot;Excel.Application&quot;)
Xl.Workbooks.Open(Path) ;открывает выбраный файл Ексель
Sleep, 1500
Run, %windir%\system32\cmd.exe, min  ; запускаем командную строку
Sleep, 1500
; Заполняем переменные из excel
name:=Xl.Range(&quot;A1&quot;).Value ;Копируем имя &quot;Иванов ИИ 01.01.2000&quot;
sleep, 1500
Sendinput, %name% ;вставляем переменную name
Xl.Application.Quit()     ; Закрываем Excel
ExitApp
return</code></pre></div><p>Описание скрипта:<br />Из таблицы Excel копируется ФИО и дата, эти данные вставляются в командную строку.</p><p>Проблема:<br />Вместо &quot;Иванов ИИ 01.01.2000&quot; вставляется &quot;Bdfyjd BB 01/01/2000&quot; (Если в момент запуска командной строки раскладка ENG)<br />Вместо &quot;Иванов ИИ 01.01.2000&quot; вставляется &quot;Иванов ИИ 01ю01ю2000&quot; (Если в момент запуска командной строки раскладка Рус)<br />Не проблема запускать скрипт с русской раскладкой, но &quot;ю&quot; вместо точки напрягает.. <br />Если вставлять в блокнот или Word то текст вставляется корректно какая раскладка не стояла бы.<br />Проблема возникла после смены ОС с Windows 7 на Windows 10.</p><p>Немного о системе:<br />Windows 10 20h2<br />AHK 1.1.33.11 Unicode 64</p><p>Заранее спасибо!</p>]]></content>
			<author>
				<name><![CDATA[folko989]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42531</uri>
			</author>
			<updated>2022-05-15T20:13:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153214#p153214</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111534#p111534" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=1073">http://forum.script-coding.com/viewtopic.php?id=1073</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-01-25T10:21:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111534#p111534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111523#p111523" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p><strong>bolkogaso</strong>, а зачем вы язык меняете перед вставкой текста?</p></blockquote></div><p>Это кусочек скрипта, в котором, среди прочего, копируется текст, из него выбирается ссылка, потом отдельно вставляется ссылка, отдельно текст. Так вот, изначально при вставке ссылки она получалась некорректной - слеши заменялись на |, и что-то ещё. Вылечил принудительным переключением раскладки на английский, на всякий случай пробежался по скрипту и вставил переключения, в зависимости от того, на каком языке вводится текст.</p>]]></content>
			<author>
				<name><![CDATA[bolkogaso]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34507</uri>
			</author>
			<updated>2017-01-25T03:59:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111523#p111523</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111519#p111519" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Вообще, по стандарту UTF-8 идет без всяких BOM, UTF-8 с BOM - выдумка мелгомягких.</p></blockquote></div><p>А что значит &quot;идёт&quot;? БОМ используется при сохранении в файл. Вполне разумная мера, на мой взгляд.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2017-01-25T03:03:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111519#p111519</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111498#p111498" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, можно проще:<br /><a href="https://autohotkey.com/docs/Scripts.htm#cp">https://autohotkey.com/docs/Scripts.htm#cp</a><br /><strong>bolkogaso</strong>, а зачем вы язык меняете перед вставкой текста?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-01-24T16:39:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111498#p111498</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111497#p111497" />
			<content type="html"><![CDATA[<p>Вообще, по стандарту UTF-8 идет без всяких BOM, UTF-8 с BOM - выдумка мелгомягких. Интерпретатор autohotkey.exe по-умолчанию использует BOM как признак UTF, а его отсутствие - как признак ANSI.<br />Код, который перезапускает сам себя как UTF-8, будучи сохранен без BOM:<br /></p><div class="codebox"><pre><code>; Save this script as UTF-8 (without BOM)
MsgBox Неllо ; in ansi encoding it doesn&#039;t look the way you expect :-)
ReloadANSIasUTF()

ReloadANSIasUTF() { ; reload script (if it run as ANSI) as UTF with all command line parameters.
	if (StrLen(&quot;а&quot;) = 2) { ; ANSI
		RegexMatch(DllCall( &quot;GetCommandLineW&quot;, &quot;Str&quot; ), &quot;^([^\s&quot;&quot;]+|&quot;&quot;[^&quot;&quot;]+?&quot;&quot;)(\s+/[rR])?\s+(?&lt;args&gt;.*)$&quot;, _)
		Run &quot;%A_AhkPath%&quot; /r /CP65001 %_args%
	}
} ; You can call this func at start of your script and use UTF-8 without BOM.</code></pre></div><p>Иной путь - в реестре дописать в параметры запуска кодировку, и поправить команду запуска в редакторе.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-01-24T16:28:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111497#p111497</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111482#p111482" />
			<content type="html"><![CDATA[<p>Честно говоря, AkelPad глючит. Ему говоришь - давай с BOM, а он всё равно без оного сохраняет.<br />По большому счёту, я часто без него сохраняю и совсем не по этой причине, для меня UTF-8 в таком виде более актуален.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-01-24T12:51:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111482#p111482</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111481#p111481" />
			<content type="html"><![CDATA[<p>Без BOM, видимо, сохраняете, вот АНК и не знает, что это UTF-8.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2017-01-24T12:40:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111481#p111481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111480#p111480" />
			<content type="html"><![CDATA[<p>Код из #2 возвращает это при UTF-8.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-01-24T12:19:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111480#p111480</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111479#p111479" />
			<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>2017-01-24T12:18:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111479#p111479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111478#p111478" />
			<content type="html"><![CDATA[<p>В данном случае мать указания на недоразумения:<br /></p><div class="quotebox"><blockquote><p>}РџРѕСЏРІР»РµРЅРёРµ Text</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-01-24T11:15:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111478#p111478</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111477#p111477" />
			<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>2017-01-24T11:08:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111477#p111477</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: проблемы со вставкой кириллицы в текущее окно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=111476#p111476" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>YMP пишет:</cite><blockquote><p>лучше в UTF-8</p></blockquote></div><p>Как раз нет.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-01-24T10:41:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=111476#p111476</id>
		</entry>
</feed>
