<?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=13825</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13825&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Перебор в обратном порядке».]]></description>
		<lastBuildDate>Fri, 08 Jun 2018 14:45:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125896#p125896</link>
			<description><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>cmt_pages=
(
&quot;id&quot;: &quot;1&quot;,
&quot;id&quot;: &quot;2&quot;,
&quot;id&quot;: &quot;3&quot;,
&quot;id&quot;: &quot;4&quot;,
&quot;id&quot;: &quot;5&quot;,
&quot;id&quot;: &quot;6&quot;,
)
arr := StrSplit(cmt_pages, &quot;`n&quot;, &quot;`r&quot;)
max := arr.MaxIndex()
Loop % max
   MsgBox, % RegExReplace( arr[ max - A_Index + 1 ], &quot;&quot;&quot;id&quot;&quot;:\s&quot;&quot;([^&quot;&quot;]+).*&quot;, &quot;$1&quot; )</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 08 Jun 2018 14:45:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125896#p125896</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125894#p125894</link>
			<description><![CDATA[<p>Я имел в виду так:<br /></p><div class="codebox"><pre><code>cmt_pages=
(
&quot;id&quot;: &quot;1&quot;,
&quot;id&quot;: &quot;2&quot;,
&quot;id&quot;: &quot;3&quot;,
&quot;id&quot;: &quot;4&quot;,
&quot;id&quot;: &quot;5&quot;,
&quot;id&quot;: &quot;6&quot;,
)
match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(cmt_pages, &quot;s)(.+?)(\R|$)&quot;,match,Pos+StrLen(match))
   a := &quot;`n&quot; match1 a

match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(a, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,&quot;,match,Pos+StrLen(match))
MsgBox % match1</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 08 Jun 2018 12:22:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125894#p125894</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125892#p125892</link>
			<description><![CDATA[<p>В 10 посте код выводит весь список, а мне нужен его перебор, для возможности обработки каждого комментария.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Fri, 08 Jun 2018 10:24:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125892#p125892</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125890#p125890</link>
			<description><![CDATA[<p>Так а в чём проблема?<br />Чем вас не устраивает вариант из 10 поста?</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 08 Jun 2018 07:41:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125890#p125890</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125889#p125889</link>
			<description><![CDATA[<p>Да.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Fri, 08 Jun 2018 07:22:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125889#p125889</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125887#p125887</link>
			<description><![CDATA[<p>То есть у вас такая структура:<br /></p><div class="codebox"><pre><code>kommentarij1
	2
	1
kommentarij2
	3
	2
	1</code></pre></div><p>А вы хотите получить такую?<br /></p><div class="codebox"><pre><code>kommentarij1
	1
	2
kommentarij2
	1
	2
	3</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 08 Jun 2018 00:00:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125887#p125887</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125886#p125886</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>А зачем?</p></blockquote></div><p>По умолчанию вложенные комментарии в выдаче API Ютуба располагаются от старых — к новым, и поэтому их надо обратить. То есть, под-ответы к основному комментарию приходят в обратном порядке.<br />С InsertAt и массивом что-то не заладилось, мне бы пример)). Правильно ли понимаю, что перебирать для этой цели придётся дважды и сходу перебирать с конца не получится?</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 07 Jun 2018 23:37:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125886#p125886</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125885#p125885</link>
			<description><![CDATA[<p>А зачем?Если вы хотите получить обратный порядок совпадений, то, как я уже писал:<br /></p><div class="codebox"><pre><code>cmt_pages=
(
&quot;id&quot;: &quot;1&quot;,
&quot;id&quot;: &quot;2&quot;,
&quot;id&quot;: &quot;3&quot;,
&quot;id&quot;: &quot;4&quot;,
&quot;id&quot;: &quot;5&quot;,
&quot;id&quot;: &quot;6&quot;,
)
match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(cmt_pages, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,&quot;,match,Pos+StrLen(match))
   a := match1 a
msgbox % a</code></pre></div><p>Если же вам необходимо именно перебирать в обратном порядке, то записывайте совпадения в массив с помощью InsertAt и потом перебирайте его.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 07 Jun 2018 22:57:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125885#p125885</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125884#p125884</link>
			<description><![CDATA[<p>Так, вроде:<br /></p><div class="codebox"><pre><code>cmt_pages=
(
&quot;id&quot;: &quot;1&quot;,
&quot;id&quot;: &quot;2&quot;,
&quot;id&quot;: &quot;3&quot;,
&quot;id&quot;: &quot;4&quot;,
&quot;id&quot;: &quot;5&quot;,
&quot;id&quot;: &quot;6&quot;,
)
match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(cmt_pages, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,&quot;,match,Pos+StrLen(match))
MsgBox % match1</code></pre></div><p>Мне надо начать перебор с конца списка.</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 07 Jun 2018 22:34:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125884#p125884</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125883#p125883</link>
			<description><![CDATA[<p>Приведите простой пример исходного текста, вашей регулярки и то, что вы хотите получить в итоге.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 07 Jun 2018 21:13:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125883#p125883</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125882#p125882</link>
			<description><![CDATA[<p>Имелся в виду while в таком формате, где не понятно, где указывать «<strong>!=</strong>»:<br /></p><div class="codebox"><pre><code>match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(cmt_pages, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorDisplayName&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorProfileImageUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorChannelUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;textOriginal&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;likeCount&quot;&quot;: (\d+),\R.+?&quot;&quot;publishedAt&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;totalReplyCount&quot;&quot;: (\d+),\R&quot;,match,Pos+StrLen(match))</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 07 Jun 2018 21:11:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125882#p125882</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125881#p125881</link>
			<description><![CDATA[<p>А разница какая между while или loop?<br /></p><div class="codebox"><pre><code>while A_Index != 10
   a := &quot;`n&quot; A_Index a
msgbox % a</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 07 Jun 2018 20:39:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125881#p125881</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125880#p125880</link>
			<description><![CDATA[<p>К сожалению, намёк не понял)). Применительно к While как это можно записать?</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 07 Jun 2018 19:59:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125880#p125880</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125859#p125859</link>
			<description><![CDATA[<div class="codebox"><pre><code>loop
   msgbox % a := A_Index a</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 07 Jun 2018 01:24:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125859#p125859</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Перебор в обратном порядке]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=125858#p125858</link>
			<description><![CDATA[<p>Там следующая конструкция (часть кода, скачивающего комментарии с Ютуба):</p><div class="codebox"><pre><code>
match := &quot;&quot;, Pos := 1
While Pos := RegExMatch(cmt_pages, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorDisplayName&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorProfileImageUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorChannelUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;textOriginal&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;likeCount&quot;&quot;: (\d+),\R.+?&quot;&quot;publishedAt&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;totalReplyCount&quot;&quot;: (\d+),\R&quot;,match,Pos+StrLen(match))
{
   y_cmts := match2 &quot;`n&quot; match3 &quot;`n&quot; match4 &quot;`n&quot; match5 &quot;`n&quot; match6 &quot;`n&quot; match7 &quot;`n&quot; match8

   If (match8 &gt; 0)
   {
      sleep, 400
      ResponseText =
      parentId := match1
      Api_Url_parentId = %apis_cmtParent%%parentId%&amp;key=%key%%other_parentId%

      HTTP.Open(&quot;GET&quot;, Api_Url_parentId, true)
   ;   HTTP.SetRequestHeader(&quot;Cookie&quot;, &quot;remixlang=0&quot;)   ; имена на русском
      HTTP.SetRequestHeader(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded&quot;)
      HTTP.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko)&quot;)
      HTTP.SetRequestHeader(&quot;Pragma&quot;, &quot;no-cache&quot;)
      HTTP.SetRequestHeader(&quot;Cache-Control&quot;, &quot;no-cache, no-store&quot;)
      HTTP.SetRequestHeader(&quot;If-Modified-Since&quot;, &quot;Sat, 1 Jan 2000 00:00:00 GMT&quot;)
      HTTP.Send()
      HTTP.WaitForResponse()
      ResponseText := HTTP.ResponseText

      matchh := &quot;&quot;, Poss := 1
      While Poss := RegExmatch(ResponseText, &quot;s)&quot;&quot;id&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorDisplayName&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorProfileImageUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;authorChannelUrl&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;textOriginal&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R.+?&quot;&quot;likeCount&quot;&quot;: (\d+),\R.+?&quot;&quot;publishedAt&quot;&quot;: &quot;&quot;(.+?)&quot;&quot;,\R&quot;,matchh,Poss+StrLen(matchh))
      {
         y_sub_cmts .= &quot;`n&lt;UL&gt;`n&quot; matchh2 &quot;`n&quot; matchh3 &quot;`n&quot; matchh4 &quot;`n&quot; matchh5 &quot;`n&quot; matchh6 &quot;`n&quot; matchh7 &quot;`n&quot; matchh8 &quot;`n&lt;UL&gt;`n&quot;
      }

   GoSub, RedTransDelim
   }
   Else
      GoSub, RedTransDelim
}
</code></pre></div><p>Как быть в этом случае?</p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Thu, 07 Jun 2018 00:21:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=125858#p125858</guid>
		</item>
	</channel>
</rss>
