<?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=13387&amp;type=atom" />
	<updated>2018-01-20T05:36:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13387</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Копирование части строки в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123227#p123227" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=8486">http://forum.script-coding.com/viewtopic.php?id=8486</a></p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-01-20T05:36:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123227#p123227</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Копирование части строки в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123224#p123224" />
			<content type="html"><![CDATA[<p>Спасибо, получилось.<br />Но теперь есть вопрос, мне нужно достать из файла определённую строчку, чтобы потом её использовать, пример строки: KOD( будет всегда начинаться с этого слова) &quot; случайные слова слова&quot;. Нужно найти эту строчку при наличие других строк без слова KOD и полностью скопировать её в переменную, номер строки всегда меняется.</p>]]></content>
			<author>
				<name><![CDATA[234783g]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39015</uri>
			</author>
			<updated>2018-01-20T03:55:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123224#p123224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:  Копирование части строки в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123220#p123220" />
			<content type="html"><![CDATA[<p>Если функциональные части строки всегда разделены одним и тем же символом, или набором символов, например, у Вас это запятая и следующий за ней пробел (&quot;, &quot;), то можно превратить такую строку в массив, в котором каждый элемент будет содержать эти части:<br /></p><div class="codebox"><pre><code>
str		:= &quot;страна 1, город1, город2&quot;
sep		:= &quot;, &quot;
strArr	:= StrSplit(str, sep)
MsgBox,,Title,% strArr[1] &quot;`n&quot; strArr[2] &quot;`n&quot; strArr[3]
</code></pre></div><p>Теперь каждая часть доступна из массива &quot;strArr&quot; по индексу, который указывается в квадратных скобках.<br />Почитайте про <a href="https://autohotkey.com/docs/commands/StringSplit.htm">StrSplit()</a> и про <a href="https://autohotkey.com/docs/misc/Arrays.htm">массивы</a>. Или поищите соответствующее описание <a href="http://www.script-coding.com/AutoHotkeyTranslation.html">в переводе</a>.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2018-01-20T00:01:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123220#p123220</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:  Копирование части строки в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123219#p123219" />
			<content type="html"><![CDATA[<p>Хочу из определённой строки txt файла взять определённый кусок и сохранить его в переменную.<br />Текст не всегда похож, например &quot; страна 1, город1, город2&quot;, представим, что &quot;страна1&quot; и &quot;город2&quot; всегда присутствуют в тексте, а на месте &quot;город1&quot; может появится любое другое слово.<br />Вопрос, как вырезать часть &quot;город1&quot; и сохранить его в переменную.<br />Если можно покажите пример кода, пытался понят функцию RegExMatch , но как-то не получилось.</p>]]></content>
			<author>
				<name><![CDATA[234783g]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39015</uri>
			</author>
			<updated>2018-01-19T23:40:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123219#p123219</id>
		</entry>
</feed>
