<?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=16715&amp;type=atom" />
	<updated>2021-11-10T14:47:06Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16715</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150578#p150578" />
			<content type="html"><![CDATA[<p>Хорошо, спасибо.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T14:47:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150578#p150578</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150577#p150577" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-10T14:42:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150577#p150577</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150576#p150576" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T14:12:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150576#p150576</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150575#p150575" />
			<content type="html"><![CDATA[<p>Все, заработало. Первый результат пустое значение выдал.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T14:05:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150575#p150575</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150574#p150574" />
			<content type="html"><![CDATA[<p>Ну не знаю.<br />У меня на 3 компьютерах выдает нужные значения.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-10T13:58:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150574#p150574</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150573#p150573" />
			<content type="html"><![CDATA[<p>Проверил, выдает пустое значения, что в анси, что в юникод.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T13:48:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150573#p150573</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150572#p150572" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-10T13:41:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150572#p150572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150571#p150571" />
			<content type="html"><![CDATA[<p>Так я и не менял его даже. Просто хотел получить имя процесса здесь: </p><div class="codebox"><pre><code>StrGet(NumGet(addr + 8))</code></pre></div><p> У меня всегда пустая строка возвращается. Решил сменить на utf-16, знаки вопроса.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T13:34:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150571#p150571</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150570#p150570" />
			<content type="html"><![CDATA[<p>Во-первых, вы криво изменили код.<br />Во-вторых, если в strget кодировку не указывать, то возвращается не utf-16, а ansi.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-10T12:15:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150570#p150570</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150569#p150569" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2021-11-10T06:57:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150569#p150569</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150568#p150568" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Хорошо, уговорили.</p><p>Обновил шапку последней правкой.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-11-09T21:12:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150568#p150568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150565#p150565" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, по идее меняться не должен, но знаю точно, что у хрома, процесс отвечающий за аудио создается только после начала проигрывания музыки.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-09T15:38:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150565#p150565</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150564#p150564" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>А почему у тебя count как ptr, он же dword?</p></blockquote></div><p>Да, ошибка, должно быть &quot;UIntP&quot;.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-11-09T15:35:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150564#p150564</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150563#p150563" />
			<content type="html"><![CDATA[<p>Я так понимаю они могут измениться только в случае перезапуска Хрома? Тогда можно оставить так, я обычно не выключаю его.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-11-09T15:34:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150563#p150563</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменение громкости только в Хроме [Решено]]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150562#p150562" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-11-09T15:30:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150562#p150562</id>
		</entry>
</feed>
