<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Последний активный Edit в Gui]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12676&amp;type=atom" />
	<updated>2017-05-16T13:38:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12676</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115893#p115893" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>shahlik002 пишет:</cite><blockquote><p>но оно полностью изменяет текст</p></blockquote></div><p>В моем же примере ничего не меняет, видимо, неправильно что-то делаете, приведите свой код, демонстрирующий проблему.<br /></p><div class="quotebox"><blockquote><p>в переменной хранит какой-то набор циферок.</p></blockquote></div><p> Этот набор циферок — хэндл последнего активного Edit&#039;а, с ControlSend можно использовать через ahk_id.<br /></p><div class="quotebox"><blockquote><p>где мне найти справку на эти мудреные команды ,которые вы используете?</p></blockquote></div><p> Справка AHK — только по синтаксису AHK, а за остальным добро пожаловать в <a href="https://ru.m.wikipedia.org/wiki/%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0_MSDN">MSDN</a>. В частности <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms647591(v=vs.85).aspx">WM_COMMAND</a> и <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/bb761685(v=vs.85).aspx">EN_SETFOCUS</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-05-16T13:38:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115893#p115893</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115892#p115892" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Вроде получилось , но оно полностью изменяет текст,а в переменной хранит какой-то набор циферок.<br />Хотел добавить ControlSend но он циферки не принимает <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" />.<br />Это можно как-то исправить?<br />В остальном все отлично отслеживает. И кстати где мне найти справку на эти мудреные команды ,которые вы используете?)<br />Ибо вид ваших скриптов в корне отличается от тех что написаны в обычной справке.Сиди и думай что значат эти &quot;static wp &gt;&gt; 16 = EN_SETFOCUS &amp;&amp; gotFocus[1] := lp&quot; и как оно относиться к графическому интерфейсу.))</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-16T12:46:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115892#p115892</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115889#p115889" />
			<content type="html"><![CDATA[<p>Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-16T06:15:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115889#p115889</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115888#p115888" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>gui,add,edit,x1 y1 w100 h20 vEdit1 gEdit
gui,add,edit,x+10 y1 w100 h20 vEdit2 gEdit
gui,add,edit,x+10 y1 w100 h20 vEdit3 gEdit
gui,add,button,x+10 y1 w100 h20 gbutt
gui,show
return

Edit:
Last_active_edit:=A_GuiControl
return

butt:
gui,submit,nohide
msgbox,% Last_active_edit
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2017-05-16T04:27:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115888#p115888</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115886#p115886" />
			<content type="html"><![CDATA[<p>Можно и без хоткеев.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-05-15T18:29:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115886#p115886</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115885#p115885" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Я имел ввиду без хоткеев.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-15T18:28:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115885#p115885</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115884#p115884" />
			<content type="html"><![CDATA[<p>У меня только одна неправильная идея : создать для всех Edit-ов Label-ы записующие в переменную последний активный Edit.<br /></p><div class="codebox"><pre><code>
gui,add,edit,x1 y1 w100 h20 vEdit1 gEdit1

Edit1:
Last_active_edit=vEdit1
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-15T18:26:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115884#p115884</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115883#p115883" />
			<content type="html"><![CDATA[<p>Можно, это просто для примера, делайте любой хоткей.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-05-15T18:23:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115883#p115883</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115882#p115882" />
			<content type="html"><![CDATA[<p>А можно без изначального хоткея на Lbutton? ибо сам этот скрипт является неким подобием редактора макросов , и каждый раз проводить эту функцию я не хочу,тем более частенько для скорости работы я использую Tab.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-15T18:21:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115882#p115882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115881#p115881" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>OnMessage( 0x111, Func(&quot;WM_COMMAND&quot;).Bind(lastActiveEdit := []) )
Loop 3
   Gui, Add, Edit
Gui, Show
Return

~LButton::
   CoordMode, Mouse
   MouseGetPos, X, Y
   GuiControl,, % lastActiveEdit[1], x%X% y%Y%
   Return

WM_COMMAND(gotFocus, wp, lp)  {
   static EN_SETFOCUS := 0x100
   (wp &gt;&gt; 16 = EN_SETFOCUS &amp;&amp; gotFocus[1] := lp)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-05-15T18:17:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115881#p115881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115880#p115880" />
			<content type="html"><![CDATA[<p>Все конечно прекрасно , однако я для себя скрипт пишу .<br />Вот у меня есть n-ое количство Edit-ов , я пишу в каком-то любом из них , потом нажимаю кнопочку хоткея на координаты мыши и клоцаю по месту координаты которого хочу определить (В этот момент сбивается фокус с Edita на Button) , а потом по задумке эти координаты должны вписаться в тот самый Edit который я редактировал.<br />Я то думал есть какая-то встроенная переменная которая содержит в себе это , но увы не нашел такой.</p>]]></content>
			<author>
				<name><![CDATA[shahlik002]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37352</uri>
			</author>
			<updated>2017-05-15T18:12:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115880#p115880</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115867#p115867" />
			<content type="html"><![CDATA[<p>Я тоже работал с окнами. Смотря что за прога. Скачай AHK spy и исследуй своё окно и найди пункт ClassNN, если его нет, как и в моём случае, то надо сначала развернуть окно и посылать туда методы стандартным способом (Send). А если ClassNN есть, то всё легко.<br /></p><div class="codebox"><pre><code>ControlSend, Edit1, This is a line of text in the notepad window., Untitled</code></pre></div><p>Где Edit1 и есть наш класс.</p>]]></content>
			<author>
				<name><![CDATA[sememix]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33892</uri>
			</author>
			<updated>2017-05-15T15:04:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115867#p115867</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115859#p115859" />
			<content type="html"><![CDATA[<p>ControlGetFocus у меня увы не определяет, но может у вас работает?<br /></p><div class="codebox"><pre><code>~*Tab::
~*LButton::
	ControlGetFocus classNN
	If (classNN ~= &quot;Edit&quot;)
		LastEditClassNN := classNN, LastEditWindowId := hWnd
	Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-05-14T18:46:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115859#p115859</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115858#p115858" />
			<content type="html"><![CDATA[<p>Я вот воспринял этот вопрос в плане: &quot;Как использовать переменную, заданную в контроле Edit&quot; (ответ: Gui, Submit, NoHide).</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-05-14T18:40:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115858#p115858</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Последний активный Edit в Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115857#p115857" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>~*LButton::
	MouseGetPos,,, hWnd, classNN
	If (classNN ~= &quot;Edit&quot;)
		LastEditNN := classNN, LastEditWindowId := hWnd
	Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-05-14T18:38:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115857#p115857</id>
		</entry>
</feed>
