<?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=18065</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18065&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Кликнуть левой удерживая правую клавишу мыши.».]]></description>
		<lastBuildDate>Sat, 13 Jan 2024 18:04:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Кликнуть левой удерживая правую клавишу мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=159903#p159903</link>
			<description><![CDATA[<p>Описание и код не сходятся. Я бы так написал:</p><div class="codebox"><pre><code>SetMouseDelay, 500
SendMode Input
isEnabled = 0
Return

#If (isEnabled = 1)
$LButton::
Sleep, 100
While(GetKeyState(&quot;LButton&quot;, &quot;P&quot;)){
 Send, {RButton Down}	; Зажать ПКМ.
 Sleep, 20
 Send, {LButton}	; Нажать ЛКМ.
 Sleep, 250
 Send, {RButton Up}	; Отпустить ПКМ.
 Sleep, 350
 Send, {LButton}	; Нажать ЛКМ.
 Sleep, 350
 Send, {LButton}	; Нажать ЛКМ.
}
Return
#If

x Up::
isEnabled := !isEnabled
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Sat, 13 Jan 2024 18:04:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=159903#p159903</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Кликнуть левой удерживая правую клавишу мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=159896#p159896</link>
			<description><![CDATA[<p>Здравствуйте. Помогите пожалуйста поправить макрос. <br />1)<br />-Зажать и удерживать правую клавишу мыши<br />*Пауза *мс<br />*Кликнуть левой клавишей мыши<br />*Пауза *мс<br />-Отпустить правую клавишу мыши.<br />*Пауза *мс.<br />*Два раза кликнуть левой клавишей мыши с интервалом 350мс.<br />(Цикл должен повторяться пока удерживается левая клавиша мыши.)<br />Включать, отключать по клавише X</p><div class="codebox"><pre><code>#NoEnv
#Persistent

SetMouseDelay, 500
SendMode Input

global isEnabled = 0

x Up::
toggleScript()
Return

Toggle:=false

~$LButton::
if(global isEnabled)
While GetKeyState(&quot;LButton&quot;, &quot;P&quot;)
	
	{
 Send {LButton down}
	Sleep, 20
 Send {LButton up}
	Sleep, 250
 Send {LButton down}
	Sleep, 20
 Send {LButton up}
	sleep, 350
Send {RButton down}
		Sleep, 200
Send {LButton down}
		Sleep, 20
Send {RButton up}
			
Send {RButton up}
	sleep, 200
	}
	
return
	
toggleScript()
{
global isEnabled = !(global isEnabled)
}</code></pre></div><p> <br />Работает, вроде<br />PS. Может кто подскажет, как сюда добавить условия-<br />Если нажата клавиша 1,2,3,4 то остановить выполнение цикла на клавиши мыши на 700 мс либо до следующего зажимания на лкм</p>]]></description>
			<author><![CDATA[null@example.com (cubikoff)]]></author>
			<pubDate>Sat, 13 Jan 2024 13:02:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=159896#p159896</guid>
		</item>
	</channel>
</rss>
