<?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=10808&amp;type=atom" />
	<updated>2017-11-08T19:02:04Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10808</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120948#p120948" />
			<content type="html"><![CDATA[<p>Так еще можно.<br /></p><div class="codebox"><pre><code>array := {ten: 10, twenty: 20, thirty: 30}

Key := &quot;My string&quot;
Value := &quot;My value&quot;
array[Key] := Value

for k, v in array
MsgBox % array[k]
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-11-08T19:02:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120948#p120948</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120942#p120942" />
			<content type="html"><![CDATA[<p>Во, спасибо! Вроде всё перепробовал, а этот вариант почему-то упустил.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-11-08T18:42:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120942#p120942</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120936#p120936" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>array := {}

Key := &quot;My string&quot;
Value := &quot;My value&quot;
array[Key] := Value

; Проверка
MsgBox, % array[key]
MsgBox, % array[&quot;My string&quot;]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-11-08T18:32:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120936#p120936</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120934#p120934" />
			<content type="html"><![CDATA[<p>Помогите разобраться. Хочу в ассоциативный массив добавлять данные, так чтобы key был строкой и value был строкой. Проблема с key: когда key содержит пробелы, я не понимаю, записывается ли он в массив. И если записывается, то как считать его?<br />Вот так работает, но, стоит подчёркивание заменить на пробел, уже не работает.<br /></p><div class="codebox"><pre><code>array := {ten: 10, twenty: 20, thirty: 30}
array.sto := 100

Key := &quot;My_string&quot;
Value := &quot;My value&quot;
array[Key] := Value

; Проверка
MsgBox, % Array.my_string</code></pre></div><p>Вообще цель такая: имеется строка, содержащая пробелы: это key. Каждому key соответствует value. Подавая на вход key, нужно получить на выходе value. Может существуют способы лучше, чем ассоциативные массивы?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-11-08T18:24:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120934#p120934</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=95819#p95819" />
			<content type="html"><![CDATA[<p>Разобрался.<br /></p><div class="codebox"><pre><code>Array := []
Loop 1000           
{
   random, var, 1000, 9999
   Array[A_Index] := var    
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sergeyols]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31692</uri>
			</author>
			<updated>2015-07-21T00:46:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=95819#p95819</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Занесение из переменной в массив]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=95818#p95818" />
			<content type="html"><![CDATA[<p>Есть переменная, назовем ее myVAR, нужно чтобы информация из нее заносилась в массив, но на новый слот. Если не понятно что нужно, вообщем скрипт будет запускать программы, я хочу чтобы скрипт записывал PID (как узнать PID я знаю, он в переменной) и в итоге я имел массив с этими PID&#039;ами.</p>]]></content>
			<author>
				<name><![CDATA[sergeyols]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31692</uri>
			</author>
			<updated>2015-07-21T00:36:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=95818#p95818</id>
		</entry>
</feed>
