<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Подтверждение ввода ControlSetText]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15372&amp;type=atom" />
	<updated>2020-05-18T21:07:11Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15372</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Подтверждение ввода ControlSetText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139609#p139609" />
			<content type="html"><![CDATA[<p><a href="https://docs.microsoft.com/en-us/windows/win32/controls/bumper-edit-control-reference-messages">https://docs.microsoft.com/en-us/window … e-messages</a><br />Да уж, пример ужасной невнимательности.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-05-18T21:07:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139609#p139609</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Подтверждение ввода ControlSetText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139604#p139604" />
			<content type="html"><![CDATA[<p>EM_SETMODIFY.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2020-05-18T01:44:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139604#p139604</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Подтверждение ввода ControlSetText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139603#p139603" />
			<content type="html"><![CDATA[<p>Ещё один костыль, хотя бы без буфера.<br /></p><div class="codebox"><pre><code>
ControlSetText, Edit1, %Text%
Control, EditPaste, % &quot;_&quot;, Edit1
ControlSend, Edit1, {Backspace}
</code></pre></div><p>или<br /></p><div class="codebox"><pre><code>
EM_SETSEL := 0xB1
ControlSetText, Edit1, _%Text%  
SendMessage, EM_SETSEL, 0, 0, Edit1 ; на всякий случай, хотя после ControlSetText каретка всегда в начале
ControlSend, Edit1, {Delete}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-05-17T21:54:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139603#p139603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Подтверждение ввода ControlSetText]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139602#p139602" />
			<content type="html"><![CDATA[<p>Вопрос в том как после введённого текста с помощью ControlSetText сторонняя программа увидела его как изменённый.<br />В данном примере блокнот не запросит сохранение при выходе.<br />Можно конечно с ControlSend послать Ctrl+A&nbsp; Ctrl+V, но хотелось бы узнать более надёжный способ.<br />Может после ControlSetText послать какое то сообщение, или с ControlSend отправить некий непечатный символ...</p><p>Да, забыл, новый текст может быть пустым, в этом случае содержимое Edit должно быть очищено.</p><div class="codebox"><pre><code>
WM_SETTEXT := 0xC

Text = 
(
AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc.
)
 
Run notepad,,, PID
WinWait, ahk_pid %PID%
WinActivate

ControlSetText, Edit1, %Text%
; SendMessage, WM_SETTEXT, 0, &amp;Text, Edit1
; ControlSendRaw, Edit1, %Text% 

; Clipboard := Text
; ControlSend, Edit1, {LCtrl Down}{A}{LCtrl Up}
; ControlSend, Edit1, {LCtrl Down}{V}{LCtrl Up}

MsgBox Close no confirm
WinClose
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-05-17T21:45:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139602#p139602</id>
		</entry>
</feed>
