<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Клик мышью без перемещения]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9102&amp;type=atom" />
	<updated>2015-01-23T08:55:24Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=9102</id>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=90892#p90892" />
			<content type="html"><![CDATA[<p>Попробовал. Не работает.</p><p>А важно , то что у меня х64 система?</p>]]></content>
			<author>
				<name><![CDATA[Mikki]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5905</uri>
			</author>
			<updated>2015-01-23T08:55:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=90892#p90892</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=90880#p90880" />
			<content type="html"><![CDATA[<p>Я сталкивался с подобным в онлайн играх. Попробуй такой вариант.<br /></p><div class="codebox"><pre><code>
WinGet, pid, pid, название окна игры
ControlClick(X,Y,&quot;ahk_pid&quot;pid)


ControlClick(X, Y, WinTitle=&quot;&quot;, WinText=&quot;&quot;, ExcludeTitle=&quot;&quot;, ExcludeText=&quot;&quot;)
{
  hwnd:=ControlFromPoint(X, Y, WinTitle, WinText, cX, cY
                             , ExcludeTitle, ExcludeText)
  PostMessage, 0x200, 0, cX&amp;0xFFFF | cY&lt;&lt;16,, ahk_id %hwnd% ; WM_MOUSEMOVE
  PostMessage, 0x2A1, 0, cX&amp;0xFFFF | cY&lt;&lt;16,, ahk_id %hwnd% ; WM_MOUSEHOVER
  PostMessage, 0x201, 0, cX&amp;0xFFFF | cY&lt;&lt;16,, ahk_id %hwnd% ; WM_LBUTTONDOWN
  PostMessage, 0x202, 0, cX&amp;0xFFFF | cY&lt;&lt;16,, ahk_id %hwnd% ; WM_LBUTTONUP
 }

ControlFromPoint(X, Y, WinTitle=&quot;&quot;, WinText=&quot;&quot;, ByRef cX=&quot;&quot;, ByRef cY=&quot;&quot;, ExcludeTitle=&quot;&quot;, ExcludeText=&quot;&quot;)
{
    if !(hwnd := WinExist(WinTitle, WinText, ExcludeTitle, ExcludeText))
        return false
  
    VarSetCapacity(pt,8)
    VarSetCapacity(wi,60), NumPut(60,wi)
    DllCall(&quot;GetWindowInfo&quot;,&quot;uint&quot;,hwnd,&quot;uint&quot;,&amp;wi)
    NumPut(X + (w:=NumGet(wi,4,&quot;int&quot;)) - (cw:=NumGet(wi,20,&quot;int&quot;)), pt,0)
    NumPut(Y + (h:=NumGet(wi,8,&quot;int&quot;)) - (ch:=NumGet(wi,24,&quot;int&quot;)), pt,4)
  
    Loop {

        child := DllCall(&quot;ChildWindowFromPointEx&quot;,&quot;uint&quot;,hwnd,&quot;int64&quot;,NumGet(pt,0,&quot;int64&quot;),&quot;uint&quot;,0x5)
        if !child or child=hwnd
            break
        DllCall(&quot;MapWindowPoints&quot;,&quot;uint&quot;,hwnd,&quot;uint&quot;,child,&quot;uint&quot;,&amp;pt,&quot;uint&quot;,1)
        hwnd := child
    }
    cX := NumGet(pt,0,&quot;int&quot;)
    cY := NumGet(pt,4,&quot;int&quot;)
   return hwnd
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[lcgamer]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32836</uri>
			</author>
			<updated>2015-01-22T19:00:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=90880#p90880</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=90871#p90871" />
			<content type="html"><![CDATA[<p>Приветствую форумчан.</p><p>Есть клиент иры <a href="http://files.spellbook.com/download/tib-unity-windows.zip">&quot;The Infinite Black&quot;</a> написанный на Unity.</p><p>Есть скрипт который успешно передает нажатие левой кнопки мыши в игру, но при этом он перемещает мышку:<br />(пример кода)<br /></p><div class="codebox"><pre><code>WinActivate, ahk_pid %current_pid%
MouseClick,, %X%, %Y%</code></pre></div><p>Я пытаюсь передать нажатие без перемещения мыши.<br />Пытался через ControlSend, через PostMessage:<br /></p><div class="codebox"><pre><code>WinActivate, ahk_pid 10760
sleep, 100
PostMessage, 0x201,, 0x00280032,, ahk_pid 10760 ; WM_LBUTTONDOWN at 50, 40
PostMessage, 0x202,, 0x00280032,, ahk_pid 10760 ; WM_LBUTTONUP at 50, 40
</code></pre></div><p>. Не работает.<br />Запускал WinSpector и видел что мэсаджи доходят.... чего ж не жмется?</p>]]></content>
			<author>
				<name><![CDATA[Mikki]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5905</uri>
			</author>
			<updated>2015-01-22T14:28:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=90871#p90871</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78801#p78801" />
			<content type="html"><![CDATA[<p>ControlClick вообще немного мистическая вещь. В одних приложениях после него окно активируется, а в других нет.</p>]]></content>
			<author>
				<name><![CDATA[Next]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=28517</uri>
			</author>
			<updated>2014-01-02T16:17:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78801#p78801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78798#p78798" />
			<content type="html"><![CDATA[<p>Есть подозрение, что в обход движения мышкой не получится реализовать клик, ибо программа блокирует это. Не однократно замечалось подобное в игровых приложениях.</p>]]></content>
			<author>
				<name><![CDATA[Mikki]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5905</uri>
			</author>
			<updated>2014-01-02T13:11:22Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78798#p78798</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78794#p78794" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Mikki пишет:</cite><blockquote><p>Вопрос: а какие либо другие действия с помощью AHK удается осуществить в окне ЕВЫ?</p></blockquote></div><p>да, двигая мышкой через MouseMove и клик например - все работает как обычно.<br />Сейчас я все реализовал через BlockInput, но период срабатывания таймера меньше 2 секунд, и не очень приятные постоянные убегания мыши, клик по кнопке&nbsp; и возвращение ее на место.</p>]]></content>
			<author>
				<name><![CDATA[lngvar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31494</uri>
			</author>
			<updated>2014-01-02T11:58:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78794#p78794</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78792#p78792" />
			<content type="html"><![CDATA[<p>Вопрос: а какие либо другие действия с помощью AHK удается осуществить в окне ЕВЫ?</p>]]></content>
			<author>
				<name><![CDATA[Mikki]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5905</uri>
			</author>
			<updated>2014-01-02T11:37:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78792#p78792</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78788#p78788" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Это называется не &quot;Клик мышью без перемещения&quot;, а &quot;Послать нажатие ЛКМ в координаты окна&quot;.</p></blockquote></div><p>и тем не менее, есть ли механизм убеждающий прогу что мышь находится над кнопкой и что бы она подсветилась ?</p>]]></content>
			<author>
				<name><![CDATA[lngvar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31494</uri>
			</author>
			<updated>2014-01-02T11:15:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78788#p78788</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78781#p78781" />
			<content type="html"><![CDATA[<p>Это называется не &quot;Клик мышью без перемещения&quot;, а &quot;Послать нажатие ЛКМ в координаты окна&quot;.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-01-02T07:03:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78781#p78781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78779#p78779" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>Ну, скриншот хотя бы приложите, указав этот «элемент управления».</p><p>Ага. Пока писал — Вы уже приложили. Только не тот <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />.</p></blockquote></div><p><a href="http://clip2net.com/s/6vpdeW">http://clip2net.com/s/6vpdeW</a>&nbsp; вот скрин из игры</p>]]></content>
			<author>
				<name><![CDATA[lngvar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31494</uri>
			</author>
			<updated>2014-01-02T02:04:13Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78779#p78779</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78778#p78778" />
			<content type="html"><![CDATA[<p>Ну, скриншот хотя бы приложите, указав этот «элемент управления».</p><p>Ага. Пока писал — Вы уже приложили. Только не тот <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-01-02T02:02:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78778#p78778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78777#p78777" />
			<content type="html"><![CDATA[<p>Эээ не понимаю, что точно интересует. Игра Eve , хендлов окон и элементов нет, все клики проходят по координатам.</p><p>вот скрин сообщений двух нажатий на кнопку <a href="http://clip2net.com/s/6vpcWD">http://clip2net.com/s/6vpcWD</a></p>]]></content>
			<author>
				<name><![CDATA[lngvar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31494</uri>
			</author>
			<updated>2014-01-02T01:58:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78777#p78777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78776#p78776" />
			<content type="html"><![CDATA[<p>Повторяю:<br /></p><div class="quotebox"><blockquote><p>Укажите приложение, … и элемент управления.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-01-02T01:56:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78776#p78776</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78775#p78775" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>Именно «ControlClick»?</p><p>Укажите приложение, диалог и элемент управления. Приведите Ваш код.</p></blockquote></div><p>ControlClick, x1161 y788, A</p><p>или</p><p>SendMessage ,0x0084,0,0x03140489,,A<br />PostMessage, 0x201, 1,0x02FE04A5,,A<br />Sleep 100<br />SendMessage ,0x0084,0,0x03140489,,A<br />PostMessage, 0x202, 0,0x02FE04A5,,A</p><p>Работает одинаково. Это игра, выполняется в оконном режиме</p>]]></content>
			<author>
				<name><![CDATA[lngvar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31494</uri>
			</author>
			<updated>2014-01-02T01:51:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78775#p78775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Клик мышью без перемещения]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=78774#p78774" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>хотя подозреваю что тоже самое реализует контролклик.</p></blockquote></div><p>Правильно подозреваете.</p><div class="quotebox"><blockquote><p>Проблема в том, что все работает прекрасно если мышь находится над кнопкой которую нужно нажать</p></blockquote></div><p>Именно «ControlClick»?</p><p>Укажите приложение, диалог и элемент управления. Приведите Ваш код.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-01-02T01:48:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=78774#p78774</id>
		</entry>
</feed>
