<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16801&amp;type=atom" />
	<updated>2021-12-05T15:36:11Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=16801</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение файла до определённой строки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=150980#p150980" />
			<content type="html"><![CDATA[<p>В поиске легко можно найти <a href="http://forum.script-coding.com/viewtopic.php?id=13914">тему с решением</a>.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-12-05T15:36:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=150980#p150980</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Чтение файла до определённой строки]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=150979#p150979" />
			<content type="html"><![CDATA[<p>Здравствуйте, помогите с&nbsp; усовершенствованием кода, пожалуйста:<br /></p><div class="codebox"><pre><code>loop
{
	loop, read, C:\Users\79099\AppData\Roaming\.minecraft\logs\latest.log
	{
		if A_LoopReadLine contains You can only use this command on your private island!
		send {t down}
                sleep 100
                send {t up)
	}
	sleep 1000 
F2:: pause
</code></pre></div><p>Проблема кода в том, что он читает абсолютно весь log файл и всё время детектит одно и то сообщение. Нужно сделать так, чтобы код читал только последние сообщения в логе файла. Сообщения чата в логах выглядят вот так: </p><p>[18:17:59] [Client thread/INFO]: [CHAT]&nbsp; &nbsp; &nbsp; &nbsp; <br />[18:18:02] [Client thread/INFO]: [CHAT] §aYou are playing on profile: §eStrawberry<br />[18:18:35] [Client thread/INFO]: [CHAT] Гильдия &gt; Alcorher вышел.<br />[18:18:58] [Client thread/INFO]: [CHAT] Mining Speed Boost is now available!<br />[18:22:43] [Client thread/INFO]: [CHAT] Друг &gt; Kvgill вышел.<br />[18:22:46] [Client thread/INFO]: [CHAT] Друг &gt; Kvgill зашёл.<br />[18:23:00] [Client thread/INFO]: [CHAT] This Teleport Pad does not have a destination set!<br />[18:24:04] [Client thread/INFO]: [CHAT] Гильдия &gt; toubi45 зашёл.<br />[18:26:08] [Client thread/INFO]: [CHAT] This Teleport Pad does not have a destination set!<br />[18:26:11] [Client thread/INFO]: [CHAT] [VIP] _ScammeR_: test<br />[18:26:15] [Client thread/INFO]: [CHAT] [VIP] _ScammeR_: chat test</p>]]></content>
			<author>
				<name><![CDATA[Mokson]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41872</uri>
			</author>
			<updated>2021-12-05T15:28:14Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=150979#p150979</id>
		</entry>
</feed>
