<?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=16715</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16715&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Изменение громкости только в Хроме [Решено]».]]></description>
		<lastBuildDate>Wed, 10 Nov 2021 14:47:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150578#p150578</link>
			<description><![CDATA[<p>Хорошо, спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 14:47:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150578#p150578</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150577#p150577</link>
			<description><![CDATA[<p>Можно сделать так:<br /></p><div class="codebox"><pre><code>Setbatchlines -1
DllCall(&quot;LoadLibrary&quot;, &quot;str&quot;, &quot;Wtsapi32.dll&quot;, &quot;ptr&quot;)
DllCall(&quot;Wtsapi32\WTSEnumerateProcesses&quot;, &quot;ptr&quot;, 0, &quot;uint&quot;, 0, &quot;uint&quot;, 1, &quot;ptr*&quot;, pProcessInfo, &quot;uint*&quot;, count)
addr := pProcessInfo
Loop % count
{
   if (A_Index = 1)
      var := &quot;System Idle Process&quot;
   else
      var := StrGet(NumGet(addr + 8))
   msgbox % var
   addr += A_PtrSize = 4 ? 16 : 24
}
DllCall(&quot;Wtsapi32\WTSFreeMemory&quot;, &quot;ptr&quot;, pProcessInfo)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 10 Nov 2021 14:42:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150577#p150577</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150576#p150576</link>
			<description><![CDATA[<p>А так нельзя написать? </p><div class="codebox"><pre><code> var := StrGet(NumGet(addr + 24))</code></pre></div><p> Чтобы не было пустого значения в начале цикла. Ну это так <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 14:12:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150576#p150576</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150575#p150575</link>
			<description><![CDATA[<p>Все, заработало. Первый результат пустое значение выдал.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 14:05:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150575#p150575</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150574#p150574</link>
			<description><![CDATA[<p>Ну не знаю.<br />У меня на 3 компьютерах выдает нужные значения.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 10 Nov 2021 13:58:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150574#p150574</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150573#p150573</link>
			<description><![CDATA[<p>Проверил, выдает пустое значения, что в анси, что в юникод.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 13:48:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150573#p150573</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150572#p150572</link>
			<description><![CDATA[<p>Сравните ваш и правильный.<br /></p><div class="codebox"><pre><code>setbatchlines -1
DllCall(&quot;LoadLibrary&quot;, &quot;str&quot;, &quot;Wtsapi32.dll&quot;, &quot;ptr&quot;)
DllCall(&quot;Wtsapi32\WTSEnumerateProcesses&quot;, &quot;ptr&quot;, 0, &quot;uint&quot;, 0, &quot;uint&quot;, 1, &quot;ptr*&quot;, pProcessInfo, &quot;uint*&quot;, count)
addr := pProcessInfo
Loop % count
{
   var := StrGet(NumGet(addr + 8))
   msgbox % var
   addr += A_PtrSize = 4 ? 16 : 24
}
DllCall(&quot;Wtsapi32\WTSFreeMemory&quot;, &quot;ptr&quot;, pProcessInfo)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 10 Nov 2021 13:41:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150572#p150572</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150571#p150571</link>
			<description><![CDATA[<p>Так я и не менял его даже. Просто хотел получить имя процесса здесь: </p><div class="codebox"><pre><code>StrGet(NumGet(addr + 8))</code></pre></div><p> У меня всегда пустая строка возвращается. Решил сменить на utf-16, знаки вопроса.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 13:34:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150571#p150571</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150570#p150570</link>
			<description><![CDATA[<p>Во-первых, вы криво изменили код.<br />Во-вторых, если в strget кодировку не указывать, то возвращается не utf-16, а ansi.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 10 Nov 2021 12:15:55 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150570#p150570</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150569#p150569</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Чтобы перебирать массив с этими структурами.</p></blockquote></div><p>Понятно. А почему в этой строке:<br /></p><div class="codebox"><pre><code> if (StrGet(NumGet(addr + 8)) = &quot;chrome.exe&quot;)</code></pre></div><p> сравнивается c &quot;chrome.exe&quot;. Пробовал так:<br /></p><div class="codebox"><pre><code>setbatchlines -1
DllCall(&quot;LoadLibrary&quot;, &quot;str&quot;, &quot;Wtsapi32.dll&quot;, &quot;ptr&quot;)

loop 100
{
   DllCall(&quot;Wtsapi32\WTSEnumerateProcesses&quot;, &quot;ptr&quot;, 0, &quot;uint&quot;, 0, &quot;uint&quot;, 1, &quot;ptr*&quot;, pProcessInfo, &quot;uint*&quot;, count)
   addr := pProcessInfo
   
      var := StrGet(NumGet(addr + 8), &quot;utf-16&quot;)
       msgbox % var

   DllCall(&quot;Wtsapi32\WTSFreeMemory&quot;, &quot;ptr&quot;, pProcessInfo)
}</code></pre></div><p>Возвращает знаки вопроса.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 10 Nov 2021 06:57:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150569#p150569</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150568#p150568</link>
			<description><![CDATA[<p><strong>Malcev</strong><br />Хорошо, уговорили.</p><p>Обновил шапку последней правкой.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Tue, 09 Nov 2021 21:12:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150568#p150568</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150565#p150565</link>
			<description><![CDATA[<p><strong>__Михаил__</strong>, по идее меняться не должен, но знаю точно, что у хрома, процесс отвечающий за аудио создается только после начала проигрывания музыки.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 09 Nov 2021 15:38:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150565#p150565</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150564#p150564</link>
			<description><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>А почему у тебя count как ptr, он же dword?</p></blockquote></div><p>Да, ошибка, должно быть &quot;UIntP&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 09 Nov 2021 15:35:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150564#p150564</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150563#p150563</link>
			<description><![CDATA[<p>Я так понимаю они могут измениться только в случае перезапуска Хрома? Тогда можно оставить так, я обычно не выключаю его.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Tue, 09 Nov 2021 15:34:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150563#p150563</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=150562#p150562</link>
			<description><![CDATA[<p>PIDs могут меняться, лучше так.<br /></p><div class="codebox"><pre><code>setbatchlines -1
DllCall(&quot;LoadLibrary&quot;, &quot;str&quot;, &quot;Wtsapi32.dll&quot;, &quot;ptr&quot;)

f11::
DllCall(&quot;Wtsapi32\WTSEnumerateProcesses&quot;, &quot;ptr&quot;, 0, &quot;uint&quot;, 0, &quot;uint&quot;, 1, &quot;ptr*&quot;, pProcessInfo, &quot;uint*&quot;, count)
addr := pProcessInfo, PIDs := []
Loop % count
{
   if (StrGet(NumGet(addr + 8)) = &quot;chrome.exe&quot;)
      PIDs[NumGet(addr + 4, &quot;uint&quot;)] := 1
   addr += A_PtrSize = 4 ? 16 : 24
}
DllCall(&quot;Wtsapi32\WTSFreeMemory&quot;, &quot;ptr&quot;, pProcessInfo)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 09 Nov 2021 15:30:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=150562#p150562</guid>
		</item>
	</channel>
</rss>
