<?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=11897&amp;type=atom" />
	<updated>2019-09-09T22:35:22Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11897</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135997#p135997" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>я тоже так делал, но не работает.</p>]]></content>
			<author>
				<name><![CDATA[yoda]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40380</uri>
			</author>
			<updated>2019-09-09T22:35:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135997#p135997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135996#p135996" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>yoda пишет:</cite><blockquote><p>а если я не знаю название процесса</p></blockquote></div><p>WinKill [название окна]</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2019-09-09T22:33:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135996#p135996</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135995#p135995" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Так, а если я не знаю название процесса? Сейчас я обнаружил 5 программ, но быть может их больше.<br />Кстати, попробую так сделать, название процесса можно из task manager взять?</p>]]></content>
			<author>
				<name><![CDATA[yoda]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40380</uri>
			</author>
			<updated>2019-09-09T21:29:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135995#p135995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135994#p135994" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Process, Close, [название процесса]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-09-09T20:57:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135994#p135994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=135993#p135993" />
			<content type="html"><![CDATA[<p>Вчера задавался аналогичным вопросам, нашел такой скрипт на гитхабе<br /></p><div class="codebox"><pre><code>
; close all windows
^o::
WinGet, id, list, , , Program Manager
Loop, %id%
{
    StringTrimRight, this_id, id%a_index%, 0
    WinGetTitle, this_title, ahk_id %this_id%
    winclose, %this_title%
}
Return
</code></pre></div><p><a href="https://github.com/matthewmorrone/autohotkey/blob/master/dev/close-all-windows.ahk%20">https://github.com/matthewmorrone/autoh … ndows.ahk </a></p><p>Всё вроде хорошо, но как оказалось не закрывает ряд следующих программ:<br />RealBench, OCCT 5.5.3, InterBurnTest, AIDA64, HWINFO<br />Причем пробовал даже просто эмулировать Alt+F4<br /></p><div class="codebox"><pre><code>Send, !{F4}</code></pre></div><p>Все равно данные программы не закрываются, хотя если руками нажму такую комбинацию - всё работает.<br />Пробовал какое-то ожидание добавлять, думаю может скрипт слишком быстро нажимает кнопки - всё равно не закрываются.<br />Кто-то знает каким макаром можно это сделать? <br />Для примера, вдруг кому проверить, OCCT - это тест стабильности системы, скачать можно тут <a href="https://www.ocbase.com/download.php%20">https://www.ocbase.com/download.php </a>(не реклама, если что), устанавливать не надо, запускается исполнительным файлом.</p><p>Попробовал код выше<br /></p><div class="codebox"><pre><code>~#vk1B:: ; Win+Esc
	winget, PID, PID, A
process, close, %PID%
If ErrorLevel = 0
{
Send, !{F4} ; закрыть программу Alt+F4
}
Return</code></pre></div><p>Тоже не работает, например тот же explorer или notepad закрывает, но вышеуказанный софт нет.</p><p><span style="color: green">Ссылки оформляются тегом &quot;URL&quot;.</span></p>]]></content>
			<author>
				<name><![CDATA[yoda]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40380</uri>
			</author>
			<updated>2019-09-09T19:39:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=135993#p135993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106725#p106725" />
			<content type="html"><![CDATA[<p>Похоже нашел способ закрыть, любой процесс так или иначе... <br /></p><div class="codebox"><pre><code>~#vk1B:: ; Win+Esc
	winget, PID, PID, A
process, close, %PID%
If ErrorLevel = 0
{
Send, !{F4} ; закрыть программу Alt+F4
}
Return</code></pre></div><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[terra-4]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31073</uri>
			</author>
			<updated>2016-08-12T18:00:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106725#p106725</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106714#p106714" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong>, Заметил что если использовать &quot;Process, Close, &quot; то программы закрываются гораздо быстрей, может с помощью AHK, можно сделать что то на подобии Alt+F4, для &quot;Process, Close, &quot; ..имел ввиду..<br /></p><div class="codebox"><pre><code>F1::
	winget, PID, PID, A
process, close, %PID%
return</code></pre></div><p>Спасибо! работает, к сожалению не везде, но то в другом разделе форума...</p>]]></content>
			<author>
				<name><![CDATA[terra-4]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31073</uri>
			</author>
			<updated>2016-08-11T19:03:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106714#p106714</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106713#p106713" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>terra-4 пишет:</cite><blockquote><p>отключить процесс, находясь в нем, не создавая под него задачу?</p></blockquote></div><p>Что это значит?<br />Закрыть процесс активного окна?<br /></p><div class="codebox"><pre><code>winget,PID,PID,A
process,close,%PID%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-08-11T17:52:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106713#p106713</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Закрытие любого процесса. [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106712#p106712" />
			<content type="html"><![CDATA[<p>Здравствуйте, помогите пожалуйста с решением задачи, которое как всегда я не нашел..</p><p>Есть скрипт, который закрывает программу через Alt+F4.<br /></p><div class="codebox"><pre><code>~#vk1B:: ; Win+Esc
   Send, !{F4} ; закрыть программу Alt+F4
return</code></pre></div><p>Знаю про возможность закрыть процесс программы.<br /></p><div class="codebox"><pre><code>F1::
Process, Close, calc.exe
return
</code></pre></div><p>Подскажите пожалуйста, как можно отключить процесс, находясь в нем, не создавая под него задачу?</p>]]></content>
			<author>
				<name><![CDATA[terra-4]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31073</uri>
			</author>
			<updated>2016-08-11T16:22:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106712#p106712</id>
		</entry>
</feed>
