<?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=10065&amp;type=atom" />
	<updated>2014-10-19T17:47:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10065</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87573#p87573" />
			<content type="html"><![CDATA[<p>Ну это я уже предлагал, нужно конструировать ahk файл исходя из данных в окне.<br />Но:<br /></p><div class="quotebox"><cite>ТС пишет:</cite><blockquote><p>Я просто хотел, чтобы без созданий других .ahk</p></blockquote></div><p>Но если ТС надо автозамену без всяких опций, то думаю что мой готовый код всё же проще, ибо готовый.</p><p>Да и если интересен regex, то надо заменить только один символ, и в переменные можно писать шаблоны.<br /></p><div class="codebox"><pre><code>If (text == v[1])</code></pre></div><p>на<br /></p><div class="codebox"><pre><code>If (text ~= v[1])</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-10-19T17:47:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87573#p87573</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87571#p87571" />
			<content type="html"><![CDATA[<p>По-моему, проще всего создавать в какой-нибудь стандартной папке (&quot;temp&quot; или&nbsp; &quot;Мои документы&quot;) дополнительный include-файл. А в GUI скрипта сделать кнопку &quot;Применить&quot; или &quot;Сохранить&quot;, при нажатии на которую скрипт перезапускается и считывает этот файл заново.<br />Как вариант, если скрипт не требуется компилировать.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-19T17:30:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87571#p87571</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87568#p87568" />
			<content type="html"><![CDATA[<p>Тогда у меня такая идея:<br /></p><div class="codebox"><pre><code>
Hot1 = ddd
Str1 = Desire
Hot2 = атп
Str2 = Автозамена текста из переменной

  ;  ---  Далее пилить  ---  
  
#NoEnv
ListLines Off
SetBatchLines -1
Global HotStrings := []

While Hot%A_Index% != &quot;&quot;
    HotStrings[A_Index] := [Hot%A_Index%, Str%A_Index%] 
    
EndChars = ()-[]{}:;&#039;&quot;/\`n %A_Tab%,.?! 

Loop  {
    Input, chr, I V L1
    SetTimer, Input, -20
}

Input:  
    If (!InStr(EndChars, chr) &amp;&amp; (chars .= chr) != &quot;&quot;)
        return  
    If Match(chars, match) 
        SendInput % &quot;{BS &quot; StrLen(chars) + 1 &quot;}{Raw}&quot; match chr
    chars := &quot;&quot;
    return
    
Match(text, byref match)  {    
    For k, v in HotStrings
        If (text == v[1])
            return 1, match := v[2]
}  
</code></pre></div><p>Думаю regex и некоторые опции замен, можно без труда прикрутить в функции Match.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-10-19T16:59:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87568#p87568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87563#p87563" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><blockquote><p>Я пытаюсь сделать небольшую программку для себя, чтобы можно было быстро расшифровывать заданные мною из программы аббревиатуры.</p></blockquote></div><p>Помоему хорошая идея, да и делов то немного. Открываем GUI с автозаменами, редактируем вместе с опциями. Пишется всё в ини файл. При запуске скрипта автозамен он читает ини файл, создаёт требуемый скрипт, запускает его, закрывает себя.</p></blockquote></div><p>Я просто хотел, чтобы без созданий других .ahk</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T15:51:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87563#p87563</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87559#p87559" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Я пытаюсь сделать небольшую программку для себя, чтобы можно было быстро расшифровывать заданные мною из программы аббревиатуры.</p></blockquote></div><p>Помоему хорошая идея, да и делов то немного. Открываем GUI с автозаменами, редактируем вместе с опциями. Пишется всё в ини файл. При запуске скрипта автозамен он читает ини файл, создаёт требуемый скрипт, запускает его, закрывает себя.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-10-19T15:42:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87559#p87559</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87558#p87558" />
			<content type="html"><![CDATA[<p>Desire, думаю на этот вопрос лучше всего ответит polyethene.<br />Спросите на оф.форуме. Народ там отзывчивый.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-19T15:38:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87558#p87558</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87557#p87557" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, ладно, это не столь важно, буду писать латинскими буквами.<br />В Dynamic Hotstrings есть проблема, что после запуска этой библиотеки ahk начинает писать в английской раскладке кириллицу всякими иероглифами и так остается после перезахода в систему. Вы, случайно, не знаете, как пофиксить?</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T15:35:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87557#p87557</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87556#p87556" />
			<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>2014-10-19T15:24:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87556#p87556</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87550#p87550" />
			<content type="html"><![CDATA[<p>Если бы в стандартной автозамене можно было использовать переменную, было бы очень здорово!</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T14:53:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87550#p87550</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87547#p87547" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Если я верно понял, <strong>polyethene</strong> ставит все клавиши клавиатуры под обработку, создавая десятки горячих клавиш.</p></blockquote></div><p>Да, и я пытался добавить туда же кириллические символы, но безуспешно.<br />Input не подходит. Я пытаюсь сделать небольшую программку для себя, чтобы можно было быстро расшифровывать заданные мною из программы аббревиатуры.</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T14:40:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87547#p87547</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87546#p87546" />
			<content type="html"><![CDATA[<p>Если я верно понял, <strong>polyethene</strong> ставит все клавиши клавиатуры под обработку, создавая десятки горячих клавиш.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-19T14:35:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87546#p87546</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87545#p87545" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>http://www.autohotkey.com/board/topic/15015-regex-powered-dynamic-hotstrings/</p></blockquote></div><p>В топике ничего не было про regex. Уже очень какой то плохой вариант, и только для английского. Вообще спецом для задачи есть команда Input, обладающая большей гибкостью, чем сами строки автозамены.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-10-19T14:26:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87545#p87545</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87543#p87543" />
			<content type="html"><![CDATA[<p>Не срабатывает, если использовать в качестве аббревиатуры кириллицу. Пофиксить не получается :С</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T13:54:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87543#p87543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87541#p87541" />
			<content type="html"><![CDATA[<p>Да уже нашел, спасибо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-10-19T12:37:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87541#p87541</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автозамена текста из переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87539#p87539" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>http://www.autohotkey.com/board/topic/15015-regex-powered-dynamic-hotstrings/</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-10-19T12:23:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87539#p87539</id>
		</entry>
</feed>
