<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK:ReadLine + AddText]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16207&amp;type=atom" />
	<updated>2021-03-27T15:57:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16207</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147009#p147009" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Lolykroly пишет:</cite><blockquote><p>А разве размер элементов и размер шрифта не имеет общих связей? Там ведь есть какие-то константы?</p></blockquote></div><p>Не имеет. Можно взять большой ЭУ типа Text и сделать его мелким шрифтом. Можно взять маленький ЭУ Text и сделать его большим шрифтом. В общем, одно другому не мешает.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2021-03-27T15:57:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147009#p147009</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146999#p146999" />
			<content type="html"><![CDATA[<p>Никогда особо этим не занимался, тут нужны более опытные кодеры.<br />Видел костыль, в котором создавалось окно, в нём выводили нужный текст, затем извлекали кол-во пикселей которое требуется на текст. Далее можно по некоторым условиями делить исходный текст для использования.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-03-27T13:16:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146999#p146999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146981#p146981" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p> текст имеет разную ширину букв, которую придётся высчитывать, ну или использовать моноширинный шрифт.</p></blockquote></div><p>А разве размер элементов и размер шрифта не имеет общих связей? Там ведь есть какие-то константы?</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T09:03:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146981#p146981</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146980#p146980" />
			<content type="html"><![CDATA[<p>Можно автоматически - только сложно, ведь текст имеет разную ширину букв, которую придётся высчитывать, ну или использовать моноширинный шрифт.<br />В предыдущем сообщении я лишь показал как делать удаление и замену текста.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-03-27T08:19:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146980#p146980</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146979#p146979" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Str_N := &quot;987&quot; ; Заменить на перевод строки.</p></blockquote></div><p>Т.е. мне надо заранее знать на каком месте строка не вписывается в ширину? А автоматически это нельзя сделать?</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T08:12:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146979#p146979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146978#p146978" />
			<content type="html"><![CDATA[<p>Для взаимодействия с данной надписью планировалось использовать другой элемент управления. Чем проще то?</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T08:10:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146978#p146978</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146977#p146977" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>File  := A_ScriptDir &quot;\Test.txt&quot;
DelStr := &quot;123&quot;	; Что убрать.
Str_N := &quot;987&quot;			; Заменить на перевод строки.

FileReadLine, Text, % File, 1			; Считывает 1 строку из файла.
StringReplace, Text, Text, % DelStr,, All	; Удаляет все совпадения.
StringReplace, Text, Text, % Str_N, % &quot;`n&quot;, All	; Заменяет все совпадения на перевод строки.

Gui, Add, Edit, x16 y12 w999 h100, % Text
Gui, Show, w1000 h300
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-03-27T08:07:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146977#p146977</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146976#p146976" />
			<content type="html"><![CDATA[<p>Для таких целей проще использовать &#039;Edit&#039;:<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x16 y12 w999 h23, % Text</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-03-27T07:59:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146976#p146976</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146975#p146975" />
			<content type="html"><![CDATA[<p>А. вобщем понял, он её разбить не может, слишком длинная. Хотя если не задавать изначальную ширину текста то пытается вместить её.<br />Вот этот момент с разбивкой<br /></p><div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>ToolTip, Text:`n%Text%</p></blockquote></div><p>Как каретку ставить чтобы перенос по указанной ширине текста был?<br />Как организовать перенос/разбивку этой строки? + убрать некоторые слова</p><p>Допустим строка состоит из &quot;Перейти по ссылке google.com&quot;<br />Нужно убрать перейти по ссылке, а оставить только google.com поместив её в A_LoopReadLine,<br />либо сделать перенос если по <strong>w100</strong> ширине указанной в Add, text не хватает места для размещения всей строки.</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T07:50:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146975#p146975</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146974#p146974" />
			<content type="html"><![CDATA[<p>Теперь понял в чём была проблема: Путь неверно указан. <br />Но всё-равно теперь не полностью строку читает, а только первые 2 слова</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T07:45:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146974#p146974</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146973#p146973" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>File  := A_ScriptDir &quot;\Test.txt&quot;
FileReadLine, Text, % File, 1
ToolTip, Text:`n%Text%

Gui, Add, Text, x16 y12 w999 h23, % Text
Gui, Show, w1000 h300
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-03-27T07:38:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146973#p146973</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:ReadLine + AddText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146972#p146972" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
Loop, Read, %A_ScriptDir%\text.txt 
{
 Text := A_LoopReadLine
}
Gui, Add, Text, x100 y200 w300 h23, %Text%
</code></pre></div><p>Как вставить в название текста переменную содержащую строку/часть из файла?</p><div class="codebox"><pre><code>FileReadLine, Text, %A_ScriptDir%\text.txt , 1
Gui, Add, Text, x100 y200 w300 h23, %Text%</code></pre></div><p>Так тоже не получается.</p>]]></content>
			<author>
				<name><![CDATA[Lolykroly]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41424</uri>
			</author>
			<updated>2021-03-27T07:13:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146972#p146972</id>
		</entry>
</feed>
