<?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=15832</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15832&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Сортировка по элементу вложенного массиву».]]></description>
		<lastBuildDate>Mon, 16 Nov 2020 06:05:49 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143494#p143494</link>
			<description><![CDATA[<p>Новый массив, в котором элементы добавлены в нужном порядке.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Mon, 16 Nov 2020 06:05:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143494#p143494</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143492#p143492</link>
			<description><![CDATA[<p>А что означает эта строчка ? <br /></p><div class="codebox"><pre><code>
newarray[-v[2]] := [k, v[1], v[2]]
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Botsy)]]></author>
			<pubDate>Sun, 15 Nov 2020 22:49:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143492#p143492</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143491#p143491</link>
			<description><![CDATA[<div class="codebox"><pre><code>myarray := []
myarray[&quot;test&quot;] := [&quot;34&quot;, 10356]
myarray[&quot;test54&quot;] := [&quot;35&quot;, 10146]
myarray[&quot;test34&quot;] := [&quot;32&quot;, 10642]
myarray[&quot;test223&quot;] := [&quot;35&quot;, 10455]

newarray := []
for k, v in myarray
	newarray[-v[2]] := [k, v[1], v[2]]
for k, v in newarray
	MsgBox % v[1] &quot;`n&quot; v[2] &quot;`n&quot; v[3]</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sun, 15 Nov 2020 22:34:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143491#p143491</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143489#p143489</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Если у вас второй элемент в кавычках, надо думать, что он должен быть интерпретирован, как строка? Соответственно, если одно из значений, например, &quot;2&quot;, то оно должно быть впереди всех в вашем примере?</p></blockquote></div><p>Нет, там числовое значение. Поправил в вопросе.</p>]]></description>
			<author><![CDATA[null@example.com (Turambar)]]></author>
			<pubDate>Sun, 15 Nov 2020 21:31:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143489#p143489</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143488#p143488</link>
			<description><![CDATA[<p>Если у вас второй элемент в кавычках, надо думать, что он должен быть интерпретирован, как строка? Соответственно, если одно из значений, например, &quot;2&quot;, то оно должно быть впереди всех в вашем примере?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 15 Nov 2020 21:26:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143488#p143488</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Сортировка по элементу вложенного массиву]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=143487#p143487</link>
			<description><![CDATA[<p>Здравствуйте.<br />Имеется массив со вложенностью.</p><div class="codebox"><pre><code>
myarray[&quot;test&quot;] := [&quot;34&quot;, 10356]
myarray[&quot;test54&quot;] := [&quot;35&quot;, 10146]
myarray[&quot;test34&quot;] := [&quot;32&quot;, 10642]
myarray[&quot;test223&quot;] := [&quot;35&quot;, 10455]
</code></pre></div><p>Нужно переформатировать массив так, чтобы элементы располагались по нисходящей в зависимости от значения второго элемента вложенного массива:<br /></p><div class="codebox"><pre><code>
myarray[&quot;test34&quot;] (10642)
myarray[&quot;test223&quot;] (10455)
myarray[&quot;test&quot;] (10356)
myarray[&quot;test54&quot;] (10146)
</code></pre></div><p>Как это проще всего сделать? Заранее благодарен за ответ.</p>]]></description>
			<author><![CDATA[null@example.com (Turambar)]]></author>
			<pubDate>Sun, 15 Nov 2020 20:31:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=143487#p143487</guid>
		</item>
	</channel>
</rss>
