<?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=15932&amp;type=atom" />
	<updated>2020-12-18T17:01:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15932</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как удалить последнюю пустую строку в файле?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144266#p144266" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Спасибо! Все работает! Думал будет какой то временный файл создаваться, но его нет. Благодарю вас за помощь! Большоеее спасибо вам!</p>]]></content>
			<author>
				<name><![CDATA[ppss42]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41305</uri>
			</author>
			<updated>2020-12-18T17:01:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144266#p144266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как удалить последнюю пустую строку в файле?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144262#p144262" />
			<content type="html"><![CDATA[<p>Попробуйте так:<br /></p><div class="codebox"><pre><code>filePath := &quot;C:\Users\User\Desktop\test.txt&quot;
File := FileOpen(filePath, &quot;rw&quot;)
len := File.Length
Loop {
   File.Pos := --len
   charCode := File.ReadUChar()
   if !{0:1, 10:1, 13:1}[charCode] || len = -1
      break
   prevChar := charCode
}
File.Length := len + 1 + (prevChar = 0)
File.Close()</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-12-18T16:20:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144262#p144262</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как удалить последнюю пустую строку в файле?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144260#p144260" />
			<content type="html"><![CDATA[<p>Здравствуйте, искал на форуме, не нашел кода компактного который бы удалял последнюю пустую строку из файла txt.<br />Есть кучка скриптов, при записи в файл всегда добавляется пустая строка.</p><p>Например есть файл out.txt<br />Там строки<br />255<br />144<br />(пустая строка)</p><p>Прошу помощи, подскажите уважаемые гуру коротенький код на удаление этой пустой последней строчки.</p>]]></content>
			<author>
				<name><![CDATA[ppss42]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41305</uri>
			</author>
			<updated>2020-12-18T14:51:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144260#p144260</id>
		</entry>
</feed>
