<?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=14455&amp;type=atom" />
	<updated>2018-12-28T19:25:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14455</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Динамическое создание строк автозамены.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130688#p130688" />
			<content type="html"><![CDATA[<p>То, что нужно. Благодарю!</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-12-28T19:25:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130688#p130688</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Динамическое создание строк автозамены.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130684#p130684" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>replace := [ [&quot;tt&quot;, &quot;test&quot;], [&quot;тт&quot;, &quot;тест&quot;] ]
for k, v in replace  {
   Loop 10
      Hotstring( &quot;:*:&quot; . v[1] . A_Index, Func(&quot;Ctrl_V&quot;).Bind(v[2] . &quot; &quot; . A_Index) )
}

Ctrl_V(param) {
   Send { ^a }
   SendInput {Text}%param%
}</code></pre></div><p>Так как-то?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-12-28T17:38:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130684#p130684</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Динамическое создание строк автозамены.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=130682#p130682" />
			<content type="html"><![CDATA[<p>Например, есть список строк автозамены вида:<br /></p><div class="codebox"><pre><code>
:*:tt1::
	Ctrl_V(&quot;test 1&quot;)
	return
:*:tt2::
	Ctrl_V(&quot;test 2&quot;)
	return
:*:tt3::
	Ctrl_V(&quot;test 3&quot;)
	return
; 10 штук

:*:тт1::
	Ctrl_V(&quot;тест 1&quot;)
	return
:*:тт2::
	Ctrl_V(&quot;тест 2&quot;)
	return
:*:тт3::
	Ctrl_V(&quot;тест 3&quot;)
	return
; 10 штук

; и ещё подобных по 10 штук, сколько-то раз
Ctrl_V(param) {
	Send { ^a }
	SendInput {Text}%param%
}
</code></pre></div><p>Повторяемость налицо. Когда возникает необходимость добавить новый &quot;тesт&quot;, нужно скопипастить ручками одну из сборок и внести в копию соответствующие изменения, а если изменяется количество, то по каждой сборке нужно проходить и удалять/добавлять соответствующее количество строк.</p><p>Понимаю, как описать скриптом, собирающий из составных частей внешний файл, подключаемый через #include, но возможно ли сделать это в текущем процессе, как, например <a href="http://forum.script-coding.com/viewtopic.php?pid=130678#p130678">тут</a>, динамически создаётся список хоткеев.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-12-28T17:13:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=130682#p130682</id>
		</entry>
</feed>
