<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Подсчет количества нефоновых процессов]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=17805</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17805&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Подсчет количества нефоновых процессов».]]></description>
		<lastBuildDate>Thu, 01 Jun 2023 15:21:51 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158414#p158414</link>
			<description><![CDATA[<p>Да, все правильно, сорри. Просто он находил предыдущий процесс, который был без параметра и присваивал и выводил его. А другой процесс шел после него и он не присваивался и не выводился.</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Thu, 01 Jun 2023 15:21:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158414#p158414</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158412#p158412</link>
			<description><![CDATA[<p>ExecutablePath не должен содержать параметров, в CommandLine они должны быть, если были при запуске процесса.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 01 Jun 2023 14:13:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158412#p158412</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158411#p158411</link>
			<description><![CDATA[<p>По логике .CommandLine и .ExecutablePath выходит, что нет. В диспетчере задач в разделе Командная строка написан путь в кавычках и параметр. Но эти свойства содержат только сам путь в кавычках без параметра.</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Thu, 01 Jun 2023 13:47:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158411#p158411</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158410#p158410</link>
			<description><![CDATA[<p>Разве параметры не часть командной строки?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 01 Jun 2023 11:53:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158410#p158410</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158409#p158409</link>
			<description><![CDATA[<p>.CommandLine и .ExecutablePath содержат только командную строку в кавычках, а нужно найти и вывести с параметром после ковычек: /agent .<br />Как сделать? Перебрал почти все Properties Win32_Process class:</p><p><a href="https://learn.microsoft.com/uk-ua/windows/win32/cimwin32prov/win32-process">https://learn.microsoft.com/uk-ua/windo … 32-process</a></p><div class="codebox"><pre><code>For Prc in ComObjGet(&quot;winmgmts:&quot;).ExecQuery(&quot;Select * from Win32_Process&quot;)
	If InStr(Prc.ExecutablePath, &quot;player&quot;)
	{
		PrcPath := Prc.ExecutablePath ; .CommandLine
	}
MsgBox % &quot;&quot; PrcPath</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Thu, 01 Jun 2023 11:04:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158409#p158409</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158401#p158401</link>
			<description><![CDATA[<p>Читайте <a href="https://www.autohotkey.com/docs/v1/Variables.htm">Variables and Expressions</a>.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 31 May 2023 16:52:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158401#p158401</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158397#p158397</link>
			<description><![CDATA[<p>Подскажите, чего не работает? Хочу вывести командную строку процесса.<br /></p><div class="codebox"><pre><code>For Prc in ComObjGet(&quot;winmgmts:&quot;).ExecQuery(&quot;Select * from Win32_Process&quot;)
	If InStr(Prc.ExecutablePath, &quot;agent&quot;)
	{
		PrcID = Prc.ProcessID
		PrcPath = Prc.ExecutablePath
	}
MsgBox % &quot;&quot; PrcPath</code></pre></div><p>Выводит &quot;Prc.ExecutablePath&quot;</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Wed, 31 May 2023 16:17:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158397#p158397</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158393#p158393</link>
			<description><![CDATA[<p>Достаточно проверить на критичность. Если у программы Lingvo.exe	[16.2.2.133] снять 2 фоновых процесса вручную, то она продолжает работать без свернутых окон и без трея. При этом она нефоновая.</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Tue, 30 May 2023 16:56:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158393#p158393</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158392#p158392</link>
			<description><![CDATA[<p>Хотя решил проверить и оказалось, что не совсем так.<br />Вначале надо проверить, что процесс критичный/некритичный, а потом уже проверять все некритичные на видимое окно.<br /></p><div class="codebox"><pre><code>pid := 7300
hProcess := DllCall(&quot;OpenProcess&quot;, &quot;uint&quot;, 0x1000, &quot;int&quot;, 0, &quot;uint&quot;, pid, &quot;ptr&quot;)
DllCall(&quot;IsProcessCritical&quot;, &quot;ptr&quot;, hProcess, &quot;int*&quot;, bool)
DllCall(&quot;CloseHandle&quot;, &quot;ptr&quot;, hProcess)
msgbox % bool </code></pre></div><p>Кстати, после установки недокументированной RtlSetProcessIsCritical, при завершении процесса получаем BSOD.<br /><a href="https://www.codeproject.com/Articles/43405/Protecting-Your-Process-with-RtlSetProcessIsCriti">https://www.codeproject.com/Articles/43 … essIsCriti</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 29 May 2023 13:22:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158392#p158392</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158391#p158391</link>
			<description><![CDATA[<p>Проверяйте есть ли у процесса видимое окно - если есть, то процесс нефоновый.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 29 May 2023 12:16:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158391#p158391</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158390#p158390</link>
			<description><![CDATA[<p>Как это выгдядеть будет?<br />IsProcessCritical(Prc) не компилируется.</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Mon, 29 May 2023 11:43:10 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158390#p158390</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158389#p158389</link>
			<description><![CDATA[<p>Тут все просто.<br /><a href="https://devblogs.microsoft.com/oldnewthing/20171219-00/?p=97606">https://devblogs.microsoft.com/oldnewth … 0/?p=97606</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 29 May 2023 10:08:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158389#p158389</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158388#p158388</link>
			<description><![CDATA[<p>Фоновый процесс это процесс, который находится в разделе &quot;фоновые процессы&quot; в диспетчере задач. У него может быть &quot;тезка&quot; в разделе &quot;Приложения.&quot;</p>]]></description>
			<author><![CDATA[null@example.com (stuermer)]]></author>
			<pubDate>Mon, 29 May 2023 07:38:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158388#p158388</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158387#p158387</link>
			<description><![CDATA[<p>Тогда всё упирается в понятие &quot;взаимодействие с пользователем&quot;. Настройки, на мой взгляд, те же команды. И если они отдаются в окне приложения, будь оно даже окно настроек, то есть ли принципиальная разница с командами в другом окне?</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Mon, 29 May 2023 05:23:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158387#p158387</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Подсчет количества нефоновых процессов]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=158386#p158386</link>
			<description><![CDATA[<p>В этом случае он может быть и таким, и таким. Иконка, например, может использоваться только для вызова окна настроек.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 29 May 2023 03:33:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=158386#p158386</guid>
		</item>
	</channel>
</rss>
