<?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=16096&amp;type=atom" />
	<updated>2021-02-18T15:18:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16096</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146313#p146313" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Спасибо большое!</p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-18T15:18:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146313#p146313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146284#p146284" />
			<content type="html"><![CDATA[<p>Вашу не запускал, у меня так получилось, если не прибавлять по 5, а просто переставлять числа.<br /></p><div class="codebox"><pre><code>arr := [&quot;LD-20&quot;, &quot;FG-25&quot;, &quot;HN-30&quot;, &quot;JF-35&quot;]

MsgBox % PrintSimpleArray(arr)
arr := RemoveAt(2, arr)
MsgBox % PrintSimpleArray(arr)
Return

RemoveAt(At, arr) {
	If (At &lt; 1 || At &gt; arr.Count())
		Return arr
	for k, v in arr, newarr := []
	{
		If (k &lt; At)
			newarr.Push(v)
		Else If (k &gt; At)
			newarr.Push(StrSplit(v, &quot;-&quot;)[1] &quot;-&quot; StrSplit(arr[k - 1], &quot;-&quot;)[2])
	}
	Return newarr
}

PrintSimpleArray(arr) {
	for k, v in arr
		str .= (v + 0 != &quot;&quot; ? v : &quot;&quot;&quot;&quot; v &quot;&quot;&quot;&quot;) &quot;, &quot; 
	Return &quot;[&quot; RTrim(str, &quot;, &quot;) &quot;]&quot;
} </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-02-18T04:29:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146284#p146284</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146281#p146281" />
			<content type="html"><![CDATA[<p>Вот функция которая вышла. Только кривая очень.<br /></p><div class="codebox"><pre><code>removeinarrayandreplace(array, number) {
	Loop % Array.MaxIndex() {
		RegExMatch(array[number+1], &quot;(.*-)(\d{1,2})&quot;, var)
		array[number+1] := var1 &quot;&quot; var2+5
	}
	array.RemoveAt(number)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T20:11:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146281#p146281</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146280#p146280" />
			<content type="html"><![CDATA[<p>Нужны точные данные что удалить, либо правило - по какому признаку определить.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-02-17T20:08:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146280#p146280</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146279#p146279" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Хорошо. Спокойной ночи. Я пока что сам попробую, если выйдет я отпишу.</p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T19:58:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146279#p146279</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146277#p146277" />
			<content type="html"><![CDATA[<p>Так это совсем другое дело. Встроенных методов для этого нет. Сейчас я не готов вам помочь, я баиньки, может завтра.<br />Вам пока советую почитать правила форума. Предложения начинаются с заглавных, и заканчиваются точкой.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-02-17T19:56:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146277#p146277</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146276#p146276" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />так в том то и дело что HN-30 нужно заменить на HN-25 a JF-35 на 30<br />значения могут быть разные</p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T19:45:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146276#p146276</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146275#p146275" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>aredlook пишет:</cite><blockquote><p> (примерно)</p></blockquote></div><p>Как же тут поможешь, если у вас что то примерно.<br />Если было [LD-20, FG-25, HN-30, JF-35] то должно стать [LD-20, HN-30, JF-35] а не [LD-20, NH-25,JF-30].</p><div class="codebox"><pre><code>arr := [&quot;LD-20&quot;, &quot;FG-25&quot;, &quot;HN-30&quot;, &quot;JF-35&quot;]
MsgBox % PrintSimpleArray(arr)
arr.RemoveAt(2)
MsgBox % PrintSimpleArray(arr)

PrintSimpleArray(arr) {
	for k, v in arr
		str .= (v + 0 != &quot;&quot; ? v : &quot;&quot;&quot;&quot; v &quot;&quot;&quot;&quot;) &quot;, &quot; 
	Return &quot;[&quot; RTrim(str, &quot;, &quot;) &quot;]&quot;
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-02-17T19:43:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146275#p146275</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146274#p146274" />
			<content type="html"><![CDATA[<p>поможете?</p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T19:40:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146274#p146274</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146272#p146272" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />спасибо!<br />смотрите, данные в массиве у меня такие [LD-20, FG-25, HN-30, JF-35] (примерно)<br />если&nbsp; я удалю допустим 2 ячейку, то должно быть так [LD-20, NH-25,JF-30]</p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T19:38:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146272#p146272</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146270#p146270" />
			<content type="html"><![CDATA[<p><strong>RemoveAt</strong><br /></p><div class="codebox"><pre><code>arr := [1,2,3,4,5]
MsgBox % PrintSimpleArray(arr)
arr.RemoveAt(2)
MsgBox % PrintSimpleArray(arr)

PrintSimpleArray(arr) {
	for k, v in arr
		str .= v &quot;, &quot; 
	Return &quot;[&quot; RTrim(str, &quot;, &quot;) &quot;]&quot;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-02-17T19:32:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146270#p146270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Смещение ячеек массива]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146269#p146269" />
			<content type="html"><![CDATA[<p>как сместить все значения массива<br />допустим есть массив [1,2,3,4,5]<br />мне нужно удалить 2, будет [1,3,4,5] <br />или допустим 3 нужно, будет[1,2,4,5] <br />и так далее<br /><strong>помогите, буду очень благодарен!</strong></p>]]></content>
			<author>
				<name><![CDATA[aredlook]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41450</uri>
			</author>
			<updated>2021-02-17T19:28:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146269#p146269</id>
		</entry>
</feed>
