<?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=18283&amp;type=atom" />
	<updated>2024-08-22T18:12:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18283</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161467#p161467" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, полезное замечание.</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-08-22T18:12:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161467#p161467</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161466#p161466" />
			<content type="html"><![CDATA[<p>А зачем посылать esc, если есть winclose?<br />И у меня с данным скриптом в фаерфоксе вложенные подменю автоматом закрываются.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2024-08-22T17:47:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161466#p161466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161465#p161465" />
			<content type="html"><![CDATA[<p><strong>p.polena</strong> Если &#039;ToolTip&#039; не нужны, то их удалить полностью нужно.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2024-08-22T17:24:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161465#p161465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161460#p161460" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, спасибо. То, что нужно. В браузере на ПКМ жесты. Иногда вместо жеста (руки кривые) выскакивает контекстное меню. Сейчас это меню скрывается без лишних действий и жест можно повторить. Окончательный вариант вашего кода для этой цели:<br /></p><div class="codebox"><pre><code>App := &quot;ahk_class MozillaDropShadowWindowClass ahk_exe r3dfox.exe&quot;
Return
*~vk2::
KeyWait, vk2, U
SetTimer, CheckMenu, -50	; Запуск метки через небольшую задержку (для появления окошка).
Return
CheckMenu:
Off := 10	; Кол-во итераций ожидания окошка. Если страница &#039;тяжёлая&#039; - увеличить значение.
While(Off){
 If WinExist(App){
  SetTimer, CheckFocus, 1000
  Break
 }
 Off -= 1
}
Return
CheckFocus:
MouseGetPos,,, MWin
If (MWin = WinExist(App)){
 ToolTip, , -9999, -9999, 10
}
Else{
 ToolTip, , -9999, -9999, 10
 Send, {Esc}
 SetTimer, CheckFocus, Off	; Выключить проверку.
 SetTimer, ToolTipOff, -500	; Выключить подсказку через 0.5 сек.
}
Return
ToolTipOff:
ToolTip,,,, 10
Return
#NoTrayIcon</code></pre></div><p>&quot;Излишеств&quot; не осталось?</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-08-21T20:42:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161460#p161460</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161459#p161459" />
			<content type="html"><![CDATA[<p>Первое что пришло в голову - проверка по таймеру. Замените переменную &#039;App&#039; на своё окно по образцу блокнота.</p><div class="codebox"><pre><code>App := &quot;ahk_class #32768 ahk_exe notepad.exe&quot;
Return

*~vk2::
KeyWait, vk2, U
SetTimer, CheckMenu, -50	; Запуск метки через небольшую задержку (для появления окошка).
Return


CheckMenu:
Off := 10	; Кол-во итераций ожидания окошка. Если страница &#039;тяжёлая&#039; - увеличить значение.
While(Off){
 If WinExist(App){
  SetTimer, CheckFocus, 100
  Break
 }
 Off -= 1
}
ToolTip, % (Off ? &quot;Ждём смены фокуса&quot;:&quot;Не найдено&quot;), -9999, -9999, 10
Return

CheckFocus:
MouseGetPos,,, MWin
If (MWin = WinExist(App)){
 ToolTip, В фокусе менюшки, -9999, -9999, 10
}
Else{
 ToolTip, Вне фокуса, -9999, -9999, 10
 Send, {Esc}
 SetTimer, CheckFocus, Off	; Выключить проверку.
 SetTimer, ToolTipOff, -1000	; Выключить подсказку через 1 сек.
}
Return

ToolTipOff:
ToolTip,,,, 10
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2024-08-21T19:15:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161459#p161459</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Автоскрытие контекстного меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161454#p161454" />
			<content type="html"><![CDATA[<p>Здравствуйте. При клике ПКМ в браузере (Firefox) появляется контекстное меню с классом:</p><div class="codebox"><pre><code>ahk_class MozillaDropShadowWindowClass</code></pre></div><p> Не получается сделать (придумать), чтобы оно автоматически закрывалось, когда фокус с него смещается. Подскажите, как реализовать?<br />Актуально и для другого софта.</p>]]></content>
			<author>
				<name><![CDATA[p.polena]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33346</uri>
			</author>
			<updated>2024-08-21T14:34:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161454#p161454</id>
		</entry>
</feed>
