<?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=16598&amp;type=atom" />
	<updated>2021-09-19T11:46:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16598</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149606#p149606" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>RegExReplace(text, &quot;s).*(?=Ключ)|\v.*&quot;)</code></pre></div></blockquote></div><p>Огромное спасибо, работает, долго голову ломал.</p>]]></content>
			<author>
				<name><![CDATA[DestroyerCode]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42000</uri>
			</author>
			<updated>2021-09-19T11:46:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149606#p149606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149605#p149605" />
			<content type="html"><![CDATA[<p>Не забывайте пожалуйста ставить точки в конце предложений.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-09-19T11:44:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149605#p149605</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149604#p149604" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>RegExReplace(text, &quot;s).*(?=Ключ)|\v.*&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-09-19T11:42:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149604#p149604</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149603#p149603" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>text =
(
Ключ - dskdmasld1564dasfklasl
Ключ - 465lgdaskldaf41564asda
Ключ - fhsg1sd6g1d65fd56dgg5
...
...
...
Ключ - kmasjkfafgf3a5sf4as546
)
MsgBox, % RegExReplace(text, &quot;s).*(?=Ключ)&quot;)</code></pre></div></blockquote></div><br /><p>Ваш пример рабочий, но помимо ключа берет и то что с низу а мне надо чтобы код сохранил только строку ключа а то что дальше ключа игнорировал.<br />Допустим помимо ключей там есть и другой текст или слова.</p><p>Пример<br /></p><div class="codebox"><pre><code>
Ключ - dskdmasld1564dasfklasl
anyText
Ключ - 465lgdaskldaf41564asda
anyText
Ключ - fhsg1sd6g1d65fd56dgg5
...
...
anyText
...
Ключ - kmasjkfafgf3a5sf4as546
anyText
anyText
anyText
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DestroyerCode]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42000</uri>
			</author>
			<updated>2021-09-19T11:37:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149603#p149603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149601#p149601" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>text =
(
Ключ - dskdmasld1564dasfklasl
Ключ - 465lgdaskldaf41564asda
Ключ - fhsg1sd6g1d65fd56dgg5
...
...
...
Ключ - kmasjkfafgf3a5sf4as546
)
MsgBox, % RegExReplace(text, &quot;s).*(?=Ключ)&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-09-19T11:12:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149601#p149601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149599#p149599" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А слово «Ключ» обязательно должно выводиться?</p></blockquote></div><p>Думаю да, но если у вас есть другой способ дайте знать.</p>]]></content>
			<author>
				<name><![CDATA[DestroyerCode]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42000</uri>
			</author>
			<updated>2021-09-19T11:07:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149599#p149599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149597#p149597" />
			<content type="html"><![CDATA[<p>А слово «Ключ» обязательно должно выводиться?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-09-19T10:55:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149597#p149597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Поиск линии и сохранения в переменную.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149596#p149596" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Помогите решить проблему, значит есть текстовый документ (txt) а в нем каждый 10 минут генерируется ключ.</p><p>Пример текстового документа.<br /></p><div class="codebox"><pre><code>
Ключ - dskdmasld1564dasfklasl
Ключ - 465lgdaskldaf41564asda
Ключ - fhsg1sd6g1d65fd56dgg5
...
...
...
Ключ - kmasjkfafgf3a5sf4as546
</code></pre></div><p>Мне необходимо чтобы MsgBox показал самый последний ключ.<br />Написал код который в принципе работает, но мой код берет самый первый ключ.<br />Помогите делать так чтобы взялся только последний.</p><div class="codebox"><pre><code>
FileRead, F, keyGen.txt
Word = Ключ
RegExMatch(F, &quot;m`a)^.*\\*\Q&quot; Word &quot;\E[^\\].*&quot;, line)
newKey := RegExReplace(line, &quot;^.+Ключ &quot;)
MsgBox %newKey%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DestroyerCode]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42000</uri>
			</author>
			<updated>2021-09-19T10:54:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149596#p149596</id>
		</entry>
</feed>
