<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=18288</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18288&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK V2: Edit. Добавляем строки и скролим вниз».]]></description>
		<lastBuildDate>Sat, 24 Aug 2024 19:56:37 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=161491#p161491</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p><strong>Anfanger</strong><br />Отлично, что используете v2. В скрипте есть недостаток: если во время заполнения кликнуть в edit куда-нибудь выше, порядок сломается.</p></blockquote></div><p>Спасибо. Не учёл, что можно изменить положение курсора.</p><p>Исправил.</p><div class="codebox"><pre><code>
MyGui := Gui()
MyEdit := MyGui.Add(&quot;Edit&quot;, &quot;r9 w300&quot;, )
MyGui.Show

NewlineEdit := &quot;`r`n&quot;
GuiEditAppend(MyEdit, &quot;Start:&quot;)

Loop 50
{
	GuiEditAppend(MyEdit, NewlineEdit . A_Index)
	Sleep 1000
}


GuiEditAppend(hEdit, Append) {
    ; Calculate required size and allocate a buffer.
    buf := Buffer(StrPut(Append))
    ; Copy or convert the string.
    StrPut(Append, buf)
    Static EM_SETSEL:=0xB1
	; Устанавливаем курсор в конец текста
    SendMessage EM_SETSEL, -2, -1, hEdit			
	Static EM_REPLACESEL:=0x00C2
	SendMessage EM_REPLACESEL, False, buf.Ptr, hEdit
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Anfanger)]]></author>
			<pubDate>Sat, 24 Aug 2024 19:56:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=161491#p161491</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=161485#p161485</link>
			<description><![CDATA[<p>Нет вроде.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 24 Aug 2024 08:18:16 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=161485#p161485</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=161484#p161484</link>
			<description><![CDATA[<p>В AHK v2 нет встроенных методов добавления строк?</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sat, 24 Aug 2024 07:59:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=161484#p161484</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=161480#p161480</link>
			<description><![CDATA[<p><strong>Anfanger</strong><br />Отлично, что используете v2. В скрипте есть недостаток: если во время заполнения кликнуть в edit куда-нибудь выше, порядок сломается.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 24 Aug 2024 07:11:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=161480#p161480</guid>
		</item>
		<item>
			<title><![CDATA[AHK V2: Edit. Добавляем строки и скролим вниз]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=161478#p161478</link>
			<description><![CDATA[<p>Идея взята с <a href="https://www.autohotkey.com/boards/viewtopic.php?p=322832#p322832">www.autohotkey.com</a> и переделана под AHK V2. Спасибо just me</p><br /><div class="codebox"><pre><code>
MyGui := Gui()
MyEdit := MyGui.Add(&quot;Edit&quot;, &quot;r9 w300&quot;, )
MyGui.Show

NewlineEdit := &quot;`r`n&quot;
GuiEditAppend(MyEdit, &quot;Start:&quot;)

Loop 20
{
	GuiEditAppend(MyEdit, NewlineEdit . A_Index)
	Sleep 500
}


GuiEditAppend(hEdit, Append) {
    ; Calculate required size and allocate a buffer.
    buf := Buffer(StrPut(Append))
    ; Copy or convert the string.
    StrPut(Append, buf)
	SendMessage 0x00C2, False, buf.Ptr, hEdit
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Anfanger)]]></author>
			<pubDate>Sat, 24 Aug 2024 00:17:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=161478#p161478</guid>
		</item>
	</channel>
</rss>
