<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: отправка текста]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=6229</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6229&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: отправка текста».]]></description>
		<lastBuildDate>Mon, 19 Sep 2011 05:58:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51672#p51672</link>
			<description><![CDATA[<p>там нет возможности отправлять сообщения кнопкой. Только ентер на клавиатуре</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Mon, 19 Sep 2011 05:58:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51672#p51672</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51671#p51671</link>
			<description><![CDATA[<p>propostaff,<br />если есть кнопка в программе отправить, то может на него и надо нажимать мышкой? да не Труъ-метод, но всё же.<br /></p><div class="codebox"><pre><code>MouseClick, left,  450,  440</code></pre></div><p>или сначало тыкнуть мышкой в программе в поле ввода, как точка начало всех действий и далее может и &quot;ентер&quot; заработает.</p>]]></description>
			<author><![CDATA[null@example.com (loshara)]]></author>
			<pubDate>Mon, 19 Sep 2011 01:47:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51671#p51671</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51637#p51637</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sun, 18 Sep 2011 05:48:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51637#p51637</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51634#p51634</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sun, 18 Sep 2011 03:05:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51634#p51634</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51630#p51630</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (creature.ws)]]></author>
			<pubDate>Sat, 17 Sep 2011 23:59:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51630#p51630</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51620#p51620</link>
			<description><![CDATA[<p>Пока ещё мне не попадались такие приложения <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />, м.б. стоит попробовать заменить слово Enter на клавиатурный код sc1C или sc11C, хотя, успех сомнителен.</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 17 Sep 2011 20:22:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51620#p51620</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51619#p51619</link>
			<description><![CDATA[<p>С помощью widow spy<br />там нету никакой кнопки отправки. Там просто поле для ввода текста и чат. Отправляется текст тольк ос помощью клавиши ентер на клавиатуре</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 20:03:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51619#p51619</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51618#p51618</link>
			<description><![CDATA[<p>Тогда как Вы определили название контрола PokerStarsChatEditorClass1?</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:57:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51618#p51618</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51617#p51617</link>
			<description><![CDATA[<p>Или возможно я не понимаю как ее определять )</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:54:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51617#p51617</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51616#p51616</link>
			<description><![CDATA[<p>Если возможно -напишите пожалуйста Вашу icq. Клавиша ентер никак не определяется.</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:49:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51616#p51616</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51615#p51615</link>
			<description><![CDATA[<p>Я имею ввиду в приложении клавишу.</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:49:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51615#p51615</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51614#p51614</link>
			<description><![CDATA[<p>Клавиша <em>энтер</em> определяется хоть как-то?, по идее она тоже контрол.</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:47:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51614#p51614</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51613#p51613</link>
			<description><![CDATA[<p>Я бы все понял, но почему-то вот это-же работает<br /></p><div class="codebox"><pre><code>#1::SendPlay hello{Enter}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:47:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51613#p51613</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51612#p51612</link>
			<description><![CDATA[<p>Там нету никакой клавиши. Просто поле для ввода и отправка текста только клавишей ентер.</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:45:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51612#p51612</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: отправка текста]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=51611#p51611</link>
			<description><![CDATA[<p>В том то и дело, что все это работает по идее, скрипты простые, но в приложении моем не работает отправка ентером, а если вручную нажимаю - работает.</p>]]></description>
			<author><![CDATA[null@example.com (propostaff)]]></author>
			<pubDate>Sat, 17 Sep 2011 19:44:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=51611#p51611</guid>
		</item>
	</channel>
</rss>
