<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Отключение ПКМ во всех GUI ActiveX]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=15974&amp;type=atom" />
	<updated>2021-01-10T13:28:04Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=15974</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отключение ПКМ во всех GUI ActiveX]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=144629#p144629" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong> Идеально, прям сочетание первого и второго способа. Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2021-01-10T13:28:04Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=144629#p144629</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Отключение ПКМ во всех GUI ActiveX]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=144622#p144622" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#If IsCurrentProcess()
RButton::Return
#If
 
IsCurrentProcess() {
	Static AHKPID := DllCall(&quot;GetCurrentProcessId&quot;)
    MouseGetPos,,, WinID
	WinGet, WinPID, PID, ahk_id %WinID%
	Return (WinPID == AHKPID)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2021-01-10T07:46:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=144622#p144622</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Отключение ПКМ во всех GUI ActiveX]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=144614#p144614" />
			<content type="html"><![CDATA[<p>Привет, подскажите как можно отключить пкм во всех gui activex ? </p><p>Пробовал следующее:<br />1) Отключал пкм, когда процесс этого окна был активен. В худшем случае так и оставлю, но лучше, чтобы в окне пкм не работал, а в других местах работал. <br /></p><div class="codebox"><pre><code>
Gui, Parent: New, ,LB
Gui, Parent: -DPIScale
Gui, Parent: Margin, 0, 0
Gui, Parent: Add, ActiveX, w1080 h854 vWB, about:&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt; 
WB.document.write(html)
....
Gui, Parent: Show

AHKPID := DllCall(&quot;GetCurrentProcessId&quot;)
Hotkey, IfWinActive, % AHKPID
Hotkey, RButton, Rbt_disabled, on

Rbt_disabled:
return
</code></pre></div><p>2) Отключал пкм только в родительском окне, вне окна пкм работал. Во всех дочерних окнах, пкм работает, а надо, чтобы тоже не работал.<br /><strong>Род. окно:</strong><br /></p><div class="codebox"><pre><code>
Gui, Parent: New, ,LB
Gui, Parent: -DPIScale +hwndID
Gui, Parent: Margin, 0, 0
Gui, Parent: Add, ActiveX, w1080 h854 vWB, about:&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt; 
WB.document.write(html)
....
Gui, Parent: Show

global AHKID := ID

#If OverScreen(AHKID)
RButton::
return
#If

OverScreen(hwndID) {
    MouseGetPos,,, wID
return (wID == AHKID)
}
</code></pre></div><p><strong>Доч. окно:</strong><br /></p><div class="codebox"><pre><code>
Gui, B: New, , Д
Gui, B: Margin, 0, 0
Gui, B: Add, ActiveX, w550 h350 vWBB, about:&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt; 
WBB.document.write(html)
WBB.document.getElementById(&quot;ex&quot;).addEventListener(&quot;mouseup&quot;, Func(&quot;OnClose&quot;))
Gui, Buy: Show
</code></pre></div><p>Не хотелось бы дублировать функцию и #if для каждого род. окна, т.к. их может быть много. Может есть какой-нибудь вариант ?<br />Буду благодарен за помощь или совет.</p>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2021-01-09T21:55:33Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=144614#p144614</id>
		</entry>
</feed>
