<?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=16851&amp;type=atom" />
	<updated>2021-12-28T03:38:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16851</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151427#p151427" />
			<content type="html"><![CDATA[<p>Да, работает! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>#Persistent
#NoTrayIcon

hIcon := LoadPicture(&quot;Shell32&quot;, &quot;Icon44&quot;, IMAGE_ICON := 1)
AddTrayIcon(hIcon, CreateGuid(_))
OnExit(&quot;RemoveTrayIcon&quot;)

AddTrayIcon(hIcon, pGUID) {
   static NIM_ADD := 0x00000000
        , flags := ( NIF_MESSAGE := 0x00000001 )
                 | ( NIF_ICON    := 0x00000002 )
                 | ( NIF_GUID    := 0x00000020 )
   VarSetCapacity(NOTIFYICONDATA, size := 64, 0)
   NumPut(size         , NOTIFYICONDATA)
   NumPut(A_ScriptHwnd , NOTIFYICONDATA, A_PtrSize)
   NumPut(flags        , NOTIFYICONDATA, A_PtrSize*2 + 4)
   NumPut(nMsg := 0x404, NOTIFYICONDATA, A_PtrSize*2 + 8)
   NumPut(hIcon        , NOTIFYICONDATA, A_PtrSize*3 + 8)
   DllCall(&quot;RtlMoveMemory&quot;, &quot;Ptr&quot;, &amp;NOTIFYICONDATA + size - A_PtrSize - 16, &quot;Ptr&quot;, pGUID, &quot;Ptr&quot;, 16)
   Return DllCall(&quot;Shell32\Shell_NotifyIcon&quot;, &quot;UInt&quot;, NIM_ADD, &quot;Ptr&quot;, &amp;NOTIFYICONDATA)
}

RemoveTrayIcon() {
   static NIM_DELETE := 0x00000002
   VarSetCapacity(NOTIFYICONDATA, size := 16, 0)
   NumPut(size        , NOTIFYICONDATA)
   NumPut(A_ScriptHwnd, NOTIFYICONDATA, A_PtrSize)
   DllCall(&quot;Shell32\Shell_NotifyIcon&quot;, &quot;UInt&quot;, NIM_DELETE, &quot;Ptr&quot;, &amp;NOTIFYICONDATA)
}

CreateGuid(ByRef GUID) {
   VarSetCapacity(GUID, 16, 0)
   DllCall(&quot;Ole32\CoCreateGuid&quot;, &quot;Ptr&quot;, &amp;GUID)
   Return &amp;GUID
}</code></pre></div><p>Может появиться среди скрытых.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-12-28T03:38:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151427#p151427</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151426#p151426" />
			<content type="html"><![CDATA[<p>Не, это я спутал трей с панелей задач.<br />Спасибо за подмечание.<br />С треем нужно делать как-то так:<br /></p><div class="quotebox"><blockquote><p>I believe the tray icon settings are stored against the executable file path and GUID (if one is specified in the NOTIFYICONDATA struct). To set a GUID (i.e. a different one for each script), you would need to create the icon yourself by filling out the struct and calling Shell_NotifyIcon.</p></blockquote></div><p><a href="https://www.autohotkey.com/boards/viewtopic.php?style=17&amp;p=91672#p91672">https://www.autohotkey.com/boards/viewt … 672#p91672</a><br />Мне проверять (писать код) лениво, но сделать точно можно, так-как, например, HD sentinel не группирует свои иконки.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-12-28T02:29:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151426#p151426</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151424#p151424" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, там же везде речь идёт о группировании на панели задач, вроде? К иконкам в трее это тоже имеет отношение?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-12-28T00:26:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151424#p151424</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151422#p151422" />
			<content type="html"><![CDATA[<p>Реестр тут не причем.<br /><a href="https://devblogs.microsoft.com/oldnewthing/20120820-00/?p=6813">https://devblogs.microsoft.com/oldnewth … 00/?p=6813</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-12-27T23:02:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151422#p151422</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151415#p151415" />
			<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-12-27T15:39:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151415#p151415</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151411#p151411" />
			<content type="html"><![CDATA[<p>Можно.<br /><a href="https://tweaker.ramensoftware.com/">https://tweaker.ramensoftware.com/</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-12-27T06:38:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151411#p151411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151410#p151410" />
			<content type="html"><![CDATA[<p>По-моему, никак.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-12-27T06:06:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151410#p151410</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Группируются иконки в трее.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151408#p151408" />
			<content type="html"><![CDATA[<p>При запуске двух исходников, в трее появляется две иконки, если одну иконку скрыть (окошко, открывающееся по стрелочке рядом с иконкой, покажу на скриншоте), то перетаскиваются обе иконки. Как этого избежать не компилируя скрипты?<br />(Как я понимаю, это происходит, ибо исходники открывает одна программа.)</p><p><span class="postimg"><img src="http://s01.geekpic.net/di-9L7R2T.png" alt="http://s01.geekpic.net/di-9L7R2T.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[Phoenixxx_Czar]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34426</uri>
			</author>
			<updated>2021-12-27T05:19:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151408#p151408</id>
		</entry>
</feed>
