<?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=16721&amp;type=atom" />
	<updated>2021-11-12T18:26:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16721</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150601#p150601" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> ваш пример отлично работает! Спасибо!<br />Переделал под себя:<br /></p><div class="codebox"><pre><code>
#IfWinActive, Ninite Zoom Unattended Silent Installer and Updater - Internet Explorer

RButton::
	BlockInput MouseMove
	Send, {vk1 Down}
	Sleep, 3000
	Send, {vk1 Up}
	BlockInput MouseMoveOff
Return

#If
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-12T18:26:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150601#p150601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150600#p150600" />
			<content type="html"><![CDATA[<p><strong>CyberGudini</strong>, ок, только точки верните, пожалуйста.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-11-12T16:30:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150600#p150600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150599#p150599" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> отлично как попробую, отпишусь.</p>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-12T14:12:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150599#p150599</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150598#p150598" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> я понял. Само событие по нажатию горячих клавиш меняет стандартный функционал Windows. Раньше я об этом не задумывался, т.к. сочетания моих горячих клавиш не пересекались с Виндовскими. А теперь подругому. <br />Почитаю то что вы посоветовали.</p>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-12T14:10:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150598#p150598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150597#p150597" />
			<content type="html"><![CDATA[<p><strong>CyberGudini</strong></p><p>AHK установил полный перехват ПКМ, естественно в других окнах ничего не произойдёт, ведь так настроен скрипт.</p><p>Вот пример как установить перехват в конкретном окне: (блокнот)</p><div class="codebox"><pre><code>#IfWinActive, ahk_exe Notepad.exe

RButton::
ToolTip, ПКМ нажат в блокноте.
KeyWait, %A_ThisHotkey%, U
Sleep, 100
ToolTip
Return

#If</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-11-12T14:07:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150597#p150597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150596#p150596" />
			<content type="html"><![CDATA[<p>Но условие выполняется уже после срабатывания горячей клавиши. Оно говорит, что делать в окне IE, а для остальных срабатывает Return, то-есть просто бездействие.<br />Вам нужно изучить директивы #If, #IfWinActive.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-11-12T13:49:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150596#p150596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150595#p150595" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>&nbsp; Не дописал:&quot;Не должно так быть.&quot; Я это хотел сказать. <br />Вы говорите что все правильно, но почему? <br />Еще раз, мне нужно, чтобы:<br />1) в окне ie правый клик мыши заменялся на левый с задержкой зажатия.&nbsp; &nbsp;Это работает. Отлично. <br />2) во всех других окнах&nbsp; Windows правый клик как обычно вызывал контекстное меню. <br /><span class="bbu"><strong>Это не работает. </strong></span> В других окнах контекстное меню правым кликом не вызывается. Вообще ничего не происходит. Каким то образом скрипт влияет на нормальную работу Windows. А такого не должно быть. Ведь я поставил условие, чтобы он работал только в ie:<br /></p><div class="codebox"><pre><code>
IfWinActive, Clients - Internet Explorer
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-12T13:44:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150595#p150595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150594#p150594" />
			<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>2021-11-12T12:38:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150594#p150594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150592#p150592" />
			<content type="html"><![CDATA[<p>Пытаюсь добить свой код, хочу чтобы работал только в окне IE:<br /></p><div class="codebox"><pre><code>
RButton::
	IfWinActive, Clients - Internet Explorer
    {
         BlockInput MouseMove
	     Send, {vk1 Down}
	     Sleep, 3000
	     Send, {vk1 Up}
	     BlockInput MouseMoveOff
    }
Return
</code></pre></div><p>И он действительно зажимает левый клик только когда нахожусь в ie. Однако почему то когда я в др. окнах не работает контекстное меню вызываемое правым кликом. Ведь не должно. Почему так?</p>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-12T11:30:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150592#p150592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150589#p150589" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong> вариант с задержкой вот сделал сам кое-как:<br /></p><div class="codebox"><pre><code>
^LButton::
	BlockInput MouseMove
	Send, {vk1 Down}
	Sleep, 3000
	Send, {vk1 Up}
	BlockInput MouseMoveOff
Return
</code></pre></div><p>А что касается первого варианта с эффектом курсора-клона... Все-таки так нельзя?</p>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-11T18:10:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150589#p150589</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150588#p150588" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, Он зажимает - да, однако работает не так как надо. Левый клик почти ничего не открывает. Лишь в диспетчер задач каким-то образом заходит. Ни кнопка Windows, ни ярлыки на панели задач не открывает.<br />О, а вот это лишнее:<br /></p><div class="codebox"><pre><code>
MouseMove, % xpos, % ypos, 10
</code></pre></div><p>Я прошу прощения я неправильно выразился вот тут:<br /></p><div class="quotebox"><blockquote><p>Т. е. мне нужно эмулировать зажатие в конкретных координатах, но при этом курсор мышки в это время уже двигается в другом направлении.</p></blockquote></div><p>Перефразирую на примере:<br />Рукой (не через скрипт) нажимаю обычным одиночным кликом на кнопку [Скачать] и сразу без задержки веду курсор к рядом открытому окну загрузки. Но когда я нажал на кнопку [Скачать], скрипт воспроизводит эффект временного зажатия левым кликом мыши на этом месте (на кнопке). В промежуток времени этого эффекта зажатия, я могу двигать курсор. Т.е. я надеялся сделать так, чтобы не нужно было задерживать курсор на том месте (на месте зажатия, иначе говоря на кнопке). Как будто появился курсор-клон, зажимающий кнопку [скачать], в то время как курсор-оригинал гуляет где хочет.<br />Но сейчас поэкспериментировав с командами AHK по управлению мыши, я предполагаю что такого эффекта невозможно добиться, да?<br />В принципе я не привереда, меня устроит и другой вариант - с задержкой курсора на кнопке. Но только я хочу чтобы мне пришлось нажимать как обычно, а скрипт бы зажимал и блокировал движение курсора пока происходит зажатие.<br />Я разобрал ваш код, без MouseMove и не считая отсутствия блокировки движения, он должен работать. Но что-то нетак. <br />А еще я так и не понял зачем вот эта часть:<br /></p><div class="codebox"><pre><code>KeyWait, %A_ThisHotkey%, U</code></pre></div>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-11T17:46:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150588#p150588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150587#p150587" />
			<content type="html"><![CDATA[<p>Проверьте этот код:</p><div class="codebox"><pre><code>
LButton::
CoordMode, Mouse
MouseGetPos, xpos, ypos
KeyWait, %A_ThisHotkey%, U
Sleep, 100
ToolTip, % &quot;[Зажим]&quot; xpos &quot;, &quot; ypos, % xpos, % ypos
Send, {vk1 Down}
Sleep, 1000
Send, {vk1 Up}
MouseMove, % xpos, % ypos, 10
ToolTip
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-11-11T16:33:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150587#p150587</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150586#p150586" />
			<content type="html"><![CDATA[<p>Команду Click используете некорректно, загляните в справку.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-11-11T16:31:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150586#p150586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150585#p150585" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, хорошо что вы спросили. Плохо. Почему то файл скачивается с ошибкой, когда вместо зажатия делаю двойной клик.</p>]]></content>
			<author>
				<name><![CDATA[CyberGudini]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42079</uri>
			</author>
			<updated>2021-11-11T15:57:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150585#p150585</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: временное зажатие мыши в координатах клика]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150584#p150584" />
			<content type="html"><![CDATA[<p>Как программа реагирует на двойной клик?</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-11-11T15:48:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150584#p150584</id>
		</entry>
</feed>
