<?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=14231&amp;type=atom" />
	<updated>2018-10-12T19:13:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14231</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129184#p129184" />
			<content type="html"><![CDATA[<p><strong>inseption86</strong> <br />Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[OlegSmirnov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39576</uri>
			</author>
			<updated>2018-10-12T19:13:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129184#p129184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129183#p129183" />
			<content type="html"><![CDATA[<p><strong>OlegSmirnov</strong></p><div class="codebox"><pre><code>#IfWinActive 1.txt — Блокнот

LButton::
  CoordMode, Mouse, Screen
  MouseGetPos, mX, mY, hWnd, 
  SendMessage, 0x84,, (mX &amp; 0xFFFF)|(mY &amp; 0xFFFF)&lt;&lt;16,, ahk_id %Hwnd%
  If ErrorLevel=20                               ; HTCLOSE
   run, C:\Program Files (x86)2\Microsoft Office2002\OFFICE11\WINWORD.EXE
  else
   Click Down
Return

LButton Up:: Click Up</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2018-10-12T19:01:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129183#p129183</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129170#p129170" />
			<content type="html"><![CDATA[<p>Нашел такой скрипт:<br /></p><div class="codebox"><pre><code>WinGet, hWnd, ID, ahk_class Notepad ; получаем хэндл блокнота

LButton::
  CoordMode, Mouse, Screen
  MouseGetPos, mX, mY, hWnd, 
  SendMessage, 0x84,, (mX &amp; 0xFFFF)|(mY &amp; 0xFFFF)&lt;&lt;16,, ahk_id %Hwnd%
  If ErrorLevel=20                               ; HTCLOSE
   WinMinimize A
  else
   Click Down
Return

LButton Up:: Click Up</code></pre></div><p>Он при нажатии на крестик закрытия - у окна любой программы - просто сворачивает это окно.</p><p>Подскажите - как заставить этот скрипт при нажатии на крестик закрытия конкретного окна Блокнот.exe с названием окна 1.txt - открывать файл C:\Program Files (x86)2\Microsoft Office2002\OFFICE11\WINWORD.EXE&nbsp; &nbsp;?</p>]]></content>
			<author>
				<name><![CDATA[OlegSmirnov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39576</uri>
			</author>
			<updated>2018-10-11T15:55:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129170#p129170</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129169#p129169" />
			<content type="html"><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=363">http://forum.script-coding.com/viewtopic.php?id=363</a></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-10-11T15:08:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129169#p129169</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129168#p129168" />
			<content type="html"><![CDATA[<p>ypppu, подскажите - где можно посмотреть эту Коллекцию ?</p>]]></content>
			<author>
				<name><![CDATA[OlegSmirnov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39576</uri>
			</author>
			<updated>2018-10-11T14:57:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129168#p129168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129167#p129167" />
			<content type="html"><![CDATA[<p>В самом начале Коллекции был пример, как назначить на крестик действие &quot;ничего не делать&quot;.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-10-11T14:50:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129167#p129167</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Переназначение кнопки закрытия определенного окна]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129166#p129166" />
			<content type="html"><![CDATA[<p>Здравствуйте, форумчане.</p><p>Появился такой вопрос.<br />Можно ли переназначить кнопку закрытия окна определенной программы ?<br />Кнопка закрытия окна Блокнот.exe с названием окна 1.txt (красный крестик) - выполняет функцию закрытия этого окна.&nbsp; </p><p>Как назначить на этот крестик (именно этого окна блокнота с названием &quot;1.txt&quot;) - какое-то другое действие, например запуск программы Word.exe ?</p>]]></content>
			<author>
				<name><![CDATA[OlegSmirnov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39576</uri>
			</author>
			<updated>2018-10-11T12:40:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129166#p129166</id>
		</entry>
</feed>
