<?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=6229&amp;type=atom" />
	<updated>2011-09-19T05:58:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6229</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51672#p51672" />
			<content type="html"><![CDATA[<p>там нет возможности отправлять сообщения кнопкой. Только ентер на клавиатуре</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-19T05:58:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51672#p51672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51671#p51671" />
			<content type="html"><![CDATA[<p>propostaff,<br />если есть кнопка в программе отправить, то может на него и надо нажимать мышкой? да не Труъ-метод, но всё же.<br /></p><div class="codebox"><pre><code>MouseClick, left,  450,  440</code></pre></div><p>или сначало тыкнуть мышкой в программе в поле ввода, как точка начало всех действий и далее может и &quot;ентер&quot; заработает.</p>]]></content>
			<author>
				<name><![CDATA[loshara]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27182</uri>
			</author>
			<updated>2011-09-19T01:47:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51671#p51671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51637#p51637" />
			<content type="html"><![CDATA[<p>Нашел решение. Сделал отправку ентера несколько раз пока не отправиться. Иногда сообщения отправляется с первого раза, но очень часто с четвертого нажатия ентер или больше. Почему не знаю. Вот скрипт. Если есть что оптимизировать - буду рад помощи. Спасибо за Ваши ответы<br /></p><div class="codebox"><pre><code>#NoTrayIcon
#Persistent
FileDelete, %A_Temp%\st.txt
text := &quot;New window open&quot;
SetKeyDelay, 100, 100
sendscript:
Sleep, 1000
WinGet, idlist, list, ahk_class PokerStarsTableFrameClass
loop, %idlist%
{
ID := idlist%A_Index%
FileRead, fileread, %A_Temp%\st.txt
IfNotInString, fileread,  %ID%
    {
    ControlSetText, , %text%, ahk_id %ID%
    Enter:
    ControlSend, PokerStarsChatEditorClass1, {Enter}, ahk_id %ID%
    ControlGetText, enter,  PokerStarsChatEditorClass1, ahk_id %ID%
    if (enter = &quot;&quot;)
    GoTo, next 
    else
    GoTo, enter
    next:
    FileAppend, %ID%`n, %A_Temp%\st.txt
    }
}
GoSub, sendscript

+!::ExitApp</code></pre></div>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-18T05:48:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51637#p51637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51634#p51634" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Grey пишет:</cite><blockquote><p>...как Вы определили название контрола PokerStarsChatEditorClass1?</p></blockquote></div><div class="quotebox"><cite>propostaff пишет:</cite><blockquote><p>С помощью widow spy</p></blockquote></div><p>Window Spy показывает <em>класс</em> окна, а не его <em>хэндл</em>.</p><p>2<strong>propostaff</strong> Откуда взято это?</p><div class="quotebox"><blockquote><p>ahk_id %ID%</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-18T03:05:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51634#p51634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51630#p51630" />
			<content type="html"><![CDATA[<p>Чтобы определить «куда же посылать энтер» можно воспользоваться <a href="http://www.autohotkey.com/docs/commands/ControlGetFocus.htm">ControlGetFocus</a><br />Например так:<br /></p><div class="codebox"><pre><code>
#Lbutton:: ; зажав win кликнуть в поле ввода
  MouseGetPos,,, id, Control1
  WinActivate, ahk_id %id%
  MouseClick
  ControlGetFocus, Control2, ahk_id %id%
  ToolTip %Control1% `n%Control2%
  sleep 1000
  ToolTip
  Clipboard := Control2
Return</code></pre></div><p>Работающий код будет примерно такой:<br /></p><div class="codebox"><pre><code>
ControlSend, PokerStarsChatEditorClass1, hello, ahk_id %ID%
ControlSend, «имя control&#039;а определённого ControlGetFocus» , {Enter}, ahk_id %ID%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2011-09-17T23:59:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51630#p51630</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51620#p51620" />
			<content type="html"><![CDATA[<p>Пока ещё мне не попадались такие приложения <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />, м.б. стоит попробовать заменить слово Enter на клавиатурный код sc1C или sc11C, хотя, успех сомнителен.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-17T20:22:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51620#p51620</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51619#p51619" />
			<content type="html"><![CDATA[<p>С помощью widow spy<br />там нету никакой кнопки отправки. Там просто поле для ввода текста и чат. Отправляется текст тольк ос помощью клавиши ентер на клавиатуре</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T20:03:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51619#p51619</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51618#p51618" />
			<content type="html"><![CDATA[<p>Тогда как Вы определили название контрола PokerStarsChatEditorClass1?</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-17T19:57:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51618#p51618</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51617#p51617" />
			<content type="html"><![CDATA[<p>Или возможно я не понимаю как ее определять )</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T19:54:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51617#p51617</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51616#p51616" />
			<content type="html"><![CDATA[<p>Если возможно -напишите пожалуйста Вашу icq. Клавиша ентер никак не определяется.</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T19:49:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51616#p51616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51615#p51615" />
			<content type="html"><![CDATA[<p>Я имею ввиду в приложении клавишу.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-17T19:49:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51615#p51615</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51614#p51614" />
			<content type="html"><![CDATA[<p>Клавиша <em>энтер</em> определяется хоть как-то?, по идее она тоже контрол.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-17T19:47:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51614#p51614</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51613#p51613" />
			<content type="html"><![CDATA[<p>Я бы все понял, но почему-то вот это-же работает<br /></p><div class="codebox"><pre><code>#1::SendPlay hello{Enter}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T19:47:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51613#p51613</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51612#p51612" />
			<content type="html"><![CDATA[<p>Там нету никакой клавиши. Просто поле для ввода и отправка текста только клавишей ентер.</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T19:45:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51612#p51612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: отправка текста]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51611#p51611" />
			<content type="html"><![CDATA[<p>В том то и дело, что все это работает по идее, скрипты простые, но в приложении моем не работает отправка ентером, а если вручную нажимаю - работает.</p>]]></content>
			<author>
				<name><![CDATA[propostaff]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27213</uri>
			</author>
			<updated>2011-09-17T19:44:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51611#p51611</id>
		</entry>
</feed>
