<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Добавление переменных в строки]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14037</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14037&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Добавление переменных в строки».]]></description>
		<lastBuildDate>Tue, 14 Aug 2018 20:04:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127945#p127945</link>
			<description><![CDATA[<p>Сохраняйте всё в новую переменную.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 14 Aug 2018 20:04:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127945#p127945</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127943#p127943</link>
			<description><![CDATA[<p>Спасибо, отредактировал. А как сделать, чтобы изменения отразились во входном тексте?</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 14 Aug 2018 19:42:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127943#p127943</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127942#p127942</link>
			<description><![CDATA[<p>При нахождении нужной строки увеличивайте счётчик n на 1 и в regexreplace замену делайте на grp%n%.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 14 Aug 2018 19:07:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127942#p127942</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127941#p127941</link>
			<description><![CDATA[<p>Вот всё, что получилось. Не понятно, как подставлять следующие переменные с учётом строк с &quot;ids&quot;:<br /></p><div class="codebox"><pre><code>grp1 := -123
grp2 := -456
grp3 := -789

Wall_Info_List =
(
{
&quot;response&quot;: [[{
&quot;ids&quot;: [380061, 419984, 419674, 419602],
&quot;comments&quot;: [0, 93, 87, 55]
}], [{
&quot;ids&quot;: [54514, 55045, 55026, 54956],
&quot;comments&quot;: [19, 1, 3, 20]
}], [{
&quot;ids&quot;: [37816, 49610, 49605, 49593],
&quot;comments&quot;: [3, 4, 1, 6]
}]]
}
)
n := 0
Loop, parse, Wall_Info_List, `n
{
   str := A_LoopField
   ifInString, A_Loopfield, &quot;ids&quot;
   {
       n+=1
       str := RegExReplace(str, &quot;(\d+)&quot;, grp%n% &quot;_$1&quot;)
   }
   txtAll .= str &quot;`n&quot;
}
Msgbox, %txtAll%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 14 Aug 2018 18:46:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127941#p127941</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127919#p127919</link>
			<description><![CDATA[<p>Так обрабатывайте в виде обычного текста.<br />Циклом либо регуляркой проходитесь по строкам, вытаскиваете нужные вам значения и заменяете их на новые.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 14 Aug 2018 05:35:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127919#p127919</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127908#p127908</link>
			<description><![CDATA[<p>Да, и так можно, тоже подойдёт. Просто предположил, что для JSON код будет объёмней, в отличие от обработки в виде обычного текста.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Mon, 13 Aug 2018 23:23:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127908#p127908</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Добавление переменных в строки]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=127906#p127906</link>
			<description><![CDATA[<div class="codebox"><pre><code>grp1 := -123
grp2 := -456
grp3 := -789

Wall_Info_List =
(
{
&quot;response&quot;: [[{
&quot;ids&quot;: [380061, 419984, 419674, 419602],
&quot;comments&quot;: [0, 93, 87, 55]
}], [{
&quot;ids&quot;: [54514, 55045, 55026, 54956],
&quot;comments&quot;: [19, 1, 3, 20]
}], [{
&quot;ids&quot;: [37816, 49610, 49605, 49593],
&quot;comments&quot;: [3, 4, 1, 6]
}]]
}
)</code></pre></div><p>Привет. Как добавить в приведенном примере кода: к первым &quot;ids&quot; — переменную &quot;grp1&quot;, ко вторым — переменную &quot;grp2&quot; — и так далее, в зависимости от количества строк с &quot;ids&quot;, с таким результатом? —</p><div class="codebox"><pre><code>grp1 := -123
grp2 := -456
grp3 := -789

Wall_Info_List =
(
{
&quot;response&quot;: [[{
&quot;ids&quot;: [-123_380061, -123_419984, -123_419674, -123_419602],
&quot;comments&quot;: [0, 93, 87, 55]
}], [{
&quot;ids&quot;: [-456_54514, -456_55045, -456_55026, -456_54956],
&quot;comments&quot;: [19, 1, 3, 20]
}], [{
&quot;ids&quot;: [-789_37816, -789_49610, -789_49605, -789_49593],
&quot;comments&quot;: [3, 4, 1, 6]
}]]
}
)</code></pre></div><p>Это надо для мониторинга ВКонтакта — появилась возможность отслеживать за один вызов — обновление для ста последних постов, в — до 25-ти сообществах.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Mon, 13 Aug 2018 21:26:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=127906#p127906</guid>
		</item>
	</channel>
</rss>
