<?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=16909&amp;type=atom" />
	<updated>2022-01-27T11:38:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16909</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151814#p151814" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
#IfWinActive КритерийОкна
~RButton::
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2022-01-27T11:38:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151814#p151814</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151813#p151813" />
			<content type="html"><![CDATA[<p><strong>Taveron</strong>, в таком варианте работает, но как сделать чтобы это ещё и работало в активном окне?</p>]]></content>
			<author>
				<name><![CDATA[baraban]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42305</uri>
			</author>
			<updated>2022-01-26T20:50:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151813#p151813</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151811#p151811" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>~RButton::</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2022-01-26T10:56:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151811#p151811</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151810#p151810" />
			<content type="html"><![CDATA[<p><strong>Taveron</strong>, в таком варианте полностью блокируется ПКМ.</p>]]></content>
			<author>
				<name><![CDATA[baraban]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42305</uri>
			</author>
			<updated>2022-01-26T10:15:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151810#p151810</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151808#p151808" />
			<content type="html"><![CDATA[<p><strong>baraban</strong>, попробуйте так:<br /></p><div class="codebox"><pre><code>
RButton::
    While GetKeyState(&quot;RButton&quot;, &quot;P&quot;) {
        ImageSearch, varX, varY, x1, y1, x2, y2, %A_ScriptDir%\Image.bmp
    }
Return

#If ErrorLevel != 0
LButton::Return
#If
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Taveron]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41949</uri>
			</author>
			<updated>2022-01-26T02:35:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151808#p151808</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151805#p151805" />
			<content type="html"><![CDATA[<p>Вот пример, дальше думаю разберётесь сами:</p><div class="codebox"><pre><code>HotKey, vk2, KK, On
Return

KK:
ToolTip, vk2,0,0
HotKey, vk1, KK0, On
KeyWait, %A_ThisHotkey%, U
HotKey, vk1, KK0, Off
ToolTip
Return

KK0:
ToolTip, vk1,30,0,2
KeyWait, %A_ThisHotkey%, U
ToolTip,,,,2
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-01-25T21:33:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151805#p151805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151804#p151804" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p><strong>baraban</strong><br />Из шапки не понятно что вы хотите получить и как оно должно работать. Распишите подробно: нажал клавишу X - произошло то-то и т.д.</p></blockquote></div><p>Зажимаю ПКМ &gt; Начинает работать основной скрипт &gt; В случае обнаружения картинки разблокируется ЛКМ &gt; В случае не обнаружения картинки ЛКМ блокируется &gt; При отпускании ПКМ ЛКМ разблокируется</p>]]></content>
			<author>
				<name><![CDATA[baraban]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42305</uri>
			</author>
			<updated>2022-01-25T21:14:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151804#p151804</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151803#p151803" />
			<content type="html"><![CDATA[<p><strong>baraban</strong><br />Из шапки не понятно что вы хотите получить и как оно должно работать. Распишите подробно: нажал клавишу X - произошло то-то и т.д.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-01-25T21:07:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151803#p151803</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151802#p151802" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Для включения / выключения перехвата клавиш есть команда &#039;Hotkey&#039;.</p></blockquote></div><p>Видел данную команду, но как её реализовать в данном скрипте?<br />Соответственно чтобы скрипт не прерывался по нажатию на ПКМ.</p>]]></content>
			<author>
				<name><![CDATA[baraban]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42305</uri>
			</author>
			<updated>2022-01-25T20:53:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151802#p151802</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151801#p151801" />
			<content type="html"><![CDATA[<p>Для включения / выключения перехвата клавиш есть команда &#039;Hotkey&#039;.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2022-01-25T19:12:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151801#p151801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151800#p151800" />
			<content type="html"><![CDATA[<p>Смотрите </p><div class="codebox"><pre><code>#If [Expression]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Foma]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31521</uri>
			</author>
			<updated>2022-01-25T19:11:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151800#p151800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Условие, блокировка ЛКМ]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151799#p151799" />
			<content type="html"><![CDATA[<p>Приветствую. Написал небольшой скрипт<br /></p><div class="codebox"><pre><code>F8::
SetTimer, ImageCheck, 20
return


ImageCheck:
ImageSearch, ImageX, ImageY, *, *, *, *, *0 A1.bmp
    if ( ErrorLevel &gt; 0 )
        {
goto, ImageCheck
        return
        }
        Click
return
F9::ExitApp</code></pre></div><p>1. Как весь основной скрипт поставить под условие зажатой ПКМ (+ соответственно бесконечный цикл проверки этого условия).<br />2. Как блокировать и разблокировать ЛКМ, чтобы данный скрипт имел вид<br /></p><div class="codebox"><pre><code>if ( ErrorLevel &gt; 0 )
        {
//ЛКМ заблокирован
goto, ImageCheck
        return
        }
//ЛКМ разблокирован</code></pre></div><p>Подскажите пожалуйста. Что я только не пробовал, но скрипт либо не работает полностью, либо работает крайне криво.</p>]]></content>
			<author>
				<name><![CDATA[baraban]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42305</uri>
			</author>
			<updated>2022-01-25T18:35:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151799#p151799</id>
		</entry>
</feed>
