<?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=18217&amp;type=atom" />
	<updated>2024-06-07T18:18:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18217</id>
		<entry>
			<title type="html"><![CDATA[AHK: Как ускорить работу с чатлогом?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161073#p161073" />
			<content type="html"><![CDATA[<p>У меня есть вот такой код<br /></p><div class="codebox"><pre><code>
SetBatchLines, -1
capt0:
PS := new PreciseSleep()
SelectedFile := &quot;chatlog.txt&quot;
filedelete, %SelectedFile%
fileappend, %SelectedFile%
capt3:
Loop, Read, %SelectedFile%
{
IfInString, A_LoopReadLine, Вы не
{
goto, capt5
}
}
goto, capt3
capt5:
PS.Sleep(4915)
sendinput, {b down}
PS.Sleep(20)
sendinput, {b up}
PS.Sleep(300)

goto capt0

class PreciseSleep {
    __New(TimePeriod := 3) {
       this.timePeriod := TimePeriod
       DllCall(&quot;Winmm\timeBeginPeriod&quot;, &quot;UInt&quot;, TimePeriod)
    }
    __Delete() {
       DllCall(&quot;Winmm\timeEndPeriod&quot;, &quot;UInt&quot;, this.timePeriod)
    }
    Sleep(ms) {
       DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, ms)
    }
}
</code></pre></div><p>Поиск надписи в чатлоге &quot;Вы не&quot;, занимает каждый раз разное время, как можно сделать чтобы это было стабильно, или же сократить это время до минимума?</p>]]></content>
			<author>
				<name><![CDATA[dedmudryj8]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43769</uri>
			</author>
			<updated>2024-06-07T18:18:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161073#p161073</id>
		</entry>
</feed>
