<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=6811</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=6811&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp».]]></description>
		<lastBuildDate>Fri, 02 Mar 2012 19:24:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57416#p57416</link>
			<description><![CDATA[<p><strong>kirtech</strong>, в чем м.б. проблема: AHK висит в трее и переодически вылетает ~ через каждые 10 мин. Раньше такого не было <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /><br />update: вылетало, сейчас в норме <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Fri, 02 Mar 2012 19:24:29 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57416#p57416</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57274#p57274</link>
			<description><![CDATA[<div class="quotebox"><cite>kirtech пишет:</cite><blockquote><p>Замените:<br /></p><div class="codebox"><pre><code>WinGet, ID,, A
WinGetClass, Class, A
if !(Class~=&quot;(Cabinet|Explore)WClass&quot;)
Return
на 
ID:=WinActive(&quot;A&quot;)
WinGetClass, Class, ahk_id %ID%
if !(Class=&quot;CabinetWClass&quot;)
Return</code></pre></div><p>что-то изменилось? <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /></p></blockquote></div><p>Теперь все супер! <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /><br />(но необходимо учитывать выбранный язык программы)<br /><strong>kirtech</strong>, спасибо - буду пока юзать Ваш вариант!</p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Sun, 26 Feb 2012 20:40:53 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57274#p57274</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57270#p57270</link>
			<description><![CDATA[<p>Замените:<br /></p><div class="codebox"><pre><code>WinGet, ID,, A
WinGetClass, Class, A
if !(Class~=&quot;(Cabinet|Explore)WClass&quot;)
Return
на 
ID:=WinActive(&quot;A&quot;)
WinGetClass, Class, ahk_id %ID%
if !(Class=&quot;CabinetWClass&quot;)
Return</code></pre></div><p>что-то изменилось? <img src="//forum.script-coding.com/img/smilies/hmm.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (kirtech)]]></author>
			<pubDate>Sun, 26 Feb 2012 20:12:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57270#p57270</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57269#p57269</link>
			<description><![CDATA[<div class="quotebox"><cite>kirtech пишет:</cite><blockquote><p><strong>Xwansu</strong>, клавиши Ctrl + F11 нажимаете находясь в окне проводника?</p></blockquote></div><p>Да. <br /></p><div class="quotebox"><cite>kirtech пишет:</cite><blockquote><p>скрипт не находит класса окна. Если вы действительно жали клавиши находясь в проводнике и при этом выделив папку или файл, то запустите утилиту ..\AutoHotkey\AutoHotkeyAU3_Spy.exe и навёв курсор мыши на окно проводника должны увидеть следующее</p></blockquote></div><p>Подтверждаю, все так и есть.</p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Sun, 26 Feb 2012 19:56:18 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57269#p57269</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57267#p57267</link>
			<description><![CDATA[<p><strong>Xwansu</strong>, клавиши Ctrl + F11 нажимаете находясь в окне проводника? Судя по этим строчкам <br /></p><div class="codebox"><pre><code>if !(Class~=&quot;(Cabinet|Explore)WClass&quot;) ; ~= -&gt; Сокращение команды RegExMatch [AHK_L 31+] !!!
013: Return (3.32)</code></pre></div><p>скрипт не находит класса окна. Если вы действительно жали клавиши находясь в проводнике и при этом выделив папку или файл, то запустите утилиту ..\AutoHotkey\AutoHotkeyAU3_Spy.exe и навёв курсор мыши на окно проводника должны увидеть следующее:<br /><span class="postimg"><img src="http://i29.fastpic.ru/big/2012/0226/9a/33cf80dbdd8a8c72c3cf00086ef3a79a.png" alt="http://i29.fastpic.ru/big/2012/0226/9a/33cf80dbdd8a8c72c3cf00086ef3a79a.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (kirtech)]]></author>
			<pubDate>Sun, 26 Feb 2012 19:04:56 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57267#p57267</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57265#p57265</link>
			<description><![CDATA[<p>Ответил по e-mail <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Sun, 26 Feb 2012 17:40:15 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57265#p57265</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57262#p57262</link>
			<description><![CDATA[<div class="quotebox"><cite>Xwansu пишет:</cite><blockquote><p>Заменил две этих строки, сохранил в формате Unicode. При запуске ничего не происходит, ошибок нет.</p></blockquote></div><p>Выполните следующий скрипт с одним выделенным файлом или папкой&nbsp; и пришлите отчет который будет скопирован в буфер обмена (пример смотрите ниже), а там будет видно.</p><div class="codebox"><pre><code>DetectHiddenWindows, On 
Process, Exist 
WinGet, hAHK,ID,ahk_pid %ErrorLevel%
global hMenu,mStr,pcm,ici,riid_IShellFolder,riid_IContextMenu,mText
riid_IShellFolder:=GUID(IID_IShellFolder,&quot;{000214E6-0000-0000-C000-000000000046}&quot;)
riid_IContextMenu:=GUID(IID_IContextMenu,&quot;{000214E4-0000-0000-C000-000000000046}&quot;)
NumPut(VarSetCapacity(ici,16+5*A_PtrSize,0),ici), NumPut(0x4000,ici,4), NumPut(hAHK,ici,8)

^F11::
WinGet, ID,, A
WinGetClass, Class, A
if !(Class~=&quot;(Cabinet|Explore)WClass&quot;)
Return
err .=&quot;1.&quot; ID &quot;|&quot;
oShell:=ComObjCreate(&quot;Shell.Application&quot;)
Loop % oShell.Windows.Count {
oIE:=oShell.Windows.Item(A_Index-1)
Sleep 10
} Until oIE.HWND=ID
oFolderItems:=oIE.Document.SelectedItems
pc:=oFolderItems.Count
if !pc {
MsgBox, Ничего не выделено!
oShell:=oIE:=oFolderItems:=&quot;&quot;
Return
}
err .=&quot;2.&quot; pc &quot;|&quot;
pl:=[]
VarSetCapacity(apidl,pc*A_PtrSize,0) ,pc:=0, hMenu:=DllCall(&quot;CreatePopupMenu&quot;)
for Item in oFolderItems {
err .=&quot;3.&quot; DllCall(&quot;shell32\SHParseDisplayName&quot;,&quot;str&quot;,Item.Path,&quot;ptr&quot;,0,&quot;ptr*&quot;,_pidl,&quot;uint&quot;,0,&quot;uint*&quot;,0) &quot;|&quot;
err .=&quot;4.&quot; DllCall(&quot;shell32\SHBindToParent&quot;,&quot;ptr&quot;,_pidl,&quot;ptr&quot;,riid_IShellFolder,&quot;ptr*&quot;,pIShellFolder,&quot;ptr*&quot;,pidl) &quot;|&quot;
pl.Insert(_pidl)
NumPut(pidl,apidl,pc*A_PtrSize)
++pc
if (pc&lt;&gt;oFolderItems.Count)
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
}
err .=&quot;5.&quot; DllCall(VTable(pIShellFolder, 10),&quot;ptr&quot;,pIShellFolder,&quot;ptr&quot;,0,&quot;uint&quot;,pc,&quot;ptr&quot;,&amp;apidl,&quot;ptr&quot;,riid_IContextMenu,&quot;ptr&quot;,0,&quot;ptr*&quot;,pcm) &quot;|&quot;
if pcm {
err .=&quot;6.&quot; DllCall(VTable(pcm,3),&quot;ptr&quot;,pcm,&quot;ptr&quot;,hMenu,&quot;uint&quot;,0,&quot;uint&quot;,3,&quot;uint&quot;,0x7FFF,&quot;uint&quot;,0) &quot;|&quot; 
if miID:=GetContexMenuCmdID(&quot;AIMP3|Добавить в плейлист&quot;)
  err .=&quot;7.&quot; miID &quot;|&quot;
  NumPut(miID-3,ici,8+A_PtrSize)
  err .=&quot;8.&quot; DllCall(VTable(pcm,4),&quot;ptr&quot;,pcm,&quot;ptr&quot;,&amp;ici) &quot;|&quot;
}
DllCall(VTable(pcm,2),&quot;ptr&quot;,pcm)
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
Loop % pl.MaxIndex()
DllCall(&quot;ole32\CoTaskMemFree&quot;,&quot;ptr&quot;,pl[A_Index])
DllCall(&quot;DestroyMenu&quot;,&quot;ptr&quot;,hMenu)
oIE:=oFolderItems:=&quot;&quot;
Clipboard:=err &quot;`n`n&quot; mText
err:=&quot;&quot;
Return

Esc::ExitApp

GetContexMenuCmdID(CmdName)
{
 Loop, Parse, CmdName, | 
 {
  nmatch:=A_Index
  miText:=A_LoopField
  nSize:=StrLen(miText)+2 ; &quot;&amp;&quot; + 00
  VarSetCapacity(mStr,nSize*2,0)
  if (A_Index=1)
  _hMenu:=hMenu
  else _hMenu:=DllCall(&quot;GetSubMenu&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
  Loop, % DllCall(&quot;GetMenuItemCount&quot;,&quot;ptr&quot;,_hMenu)
  { 
    miN:=A_Index-1, miID:=DllCall(&quot;GetMenuItemID&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
    DllCall(&quot;GetMenuStringW&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN,&quot;wstr&quot;,mStr,&quot;int&quot;,nSize,&quot;uint&quot;,0x400)
    StringReplace, _mStr,mStr,&amp;,,All
	mText .=mStr &quot;`n&quot;
    if (miText=_mStr) {
    ++match
    Break
    }
  }
 }
 if (match=nmatch)
 return miID
}

VTable(ptr, n) {
  return NumGet(NumGet(ptr+0),n*A_PtrSize)
}

GUID(ByRef GUID, sGUID) ; Converts a string to a binary GUID and returns its address.
{
  VarSetCapacity(GUID,16,0)
  return DllCall(&quot;ole32\CLSIDFromString&quot;,&quot;wstr&quot;,sGUID,&quot;ptr&quot;,&amp;GUID) &gt;= 0 ? &amp;GUID : &quot;&quot;
}</code></pre></div><p>Цифры после &quot;3.&quot;,&quot;4.&quot;,&quot;5.&quot;,&quot;8.&quot; должны быть нулями, остальные просто должны быть.</p><div class="codebox"><pre><code>1.0x101fa|2.1|3.0|4.0|5.0|6.170|7.159|8.0|

&amp;Откры
&amp;App M
&amp;Прово
&amp;Searc
[--- &amp;
&amp;Просм
&amp;Найти
Добави
Воспро
Добави
&amp;Добав
&amp;Воспр

AIMP3
Воспроизвести
Добавить в плейлист</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kirtech)]]></author>
			<pubDate>Sun, 26 Feb 2012 16:11:08 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57262#p57262</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57260#p57260</link>
			<description><![CDATA[<div class="quotebox"><cite>kirtech пишет:</cite><blockquote><div class="quotebox"><cite>Xwansu пишет:</cite><blockquote><p>Не работает на win7 x64, AutoHotkey_L&nbsp; Unicode.</p></blockquote></div><p>Замените строки:</p><div class="codebox"><pre><code>NumPut(VarSetCapacity(ici,36,0),ici)
на 
NumPut(VarSetCapacity(ici,16+5*A_PtrSize,0),ici)
...
NumPut(miID-3,ici,12)
на
NumPut(miID-3,ici,8+A_PtrSize)</code></pre></div></blockquote></div><p>Заменил две этих строки, сохранил в формате Unicode. При запуске ничего не происходит, ошибок нет.</p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Sun, 26 Feb 2012 14:37:59 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57260#p57260</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57240#p57240</link>
			<description><![CDATA[<div class="quotebox"><cite>Xwansu пишет:</cite><blockquote><p>Не работает на win7 x64, AutoHotkey_L&nbsp; Unicode.</p></blockquote></div><p>Это моя ошибка, я не учёл что указатели в структуре ici займут 8 байт каждый <img src="//forum.script-coding.com/img/smilies/tongue.png" width="15" height="15" /> ,&nbsp; в сриптах выше уже поправил. Установил Windows 7 x64 в VirtualBox нашел и исправил ошибки, проверил - работает.</p><p>Насчёт утечек объектов Gdi утилита <a href="http://msdn.microsoft.com/en-us/magazine/cc188782.aspx">GdiUsage</a>,показала что это изображения добавляемые в меню сторонними приложениями(AkelPad например) и они не удаляются после его разрушения. Я пытался их получить для дальнейшего удаления с помощью следующего кода, но безрезультатно. </p><div class="codebox"><pre><code>
GetContexMenuBitmaps()
{
	VarSetCapacity(MENUITEMINFO,44,0)
	NumPut(0x10,MENUITEMINFO,4) ; MIIM_TYPE = 0x10
	NumPut(4,MENUITEMINFO,8)  ; MFT_BITMAP = 0x4
	Loop % DllCall(&quot;GetMenuItemCount&quot;,&quot;ptr&quot;,hMenu) {
    miN:=A_Index-1
	;miID:=DllCall(&quot;GetMenuItemID&quot;,&quot;ptr&quot;,hMenu,&quot;int&quot;,miN)
    msgbox % DllCall(&quot;GetMenuItemInfoW&quot;,&quot;ptr&quot;,hMenu,&quot;uint&quot;,miN,&quot;int&quot;,1,&quot;ptr&quot;,&amp;MENUITEMINFO)
	if hbmp:=NumGet(MENUITEMINFO,36) ; NumGet(MENUITEMINFO,24)
	bitmaps.=hbmp &quot;`n&quot;
	;hSubMenu:=NumGet(MENUITEMINFO,20)
	}
    msgbox % bitmaps
}</code></pre></div><p>С памятью не всё так просто, потому что при первом вызове меню в процесс подгужается довольно большое кол-во библиотек которые и отъедают эту память, а вот что происходит дальше проконтролировать не легко.</p>]]></description>
			<author><![CDATA[null@example.com (kirtech)]]></author>
			<pubDate>Sun, 26 Feb 2012 05:37:39 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57240#p57240</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57211#p57211</link>
			<description><![CDATA[<div class="quotebox"><cite>kirtech пишет:</cite><blockquote><p>Скрипт был опробован на двух компьютерах под Windows XP SP3, AutoHotkey_L x86 Unicode,&nbsp; но возможно будет работать и на x64</p></blockquote></div><p>Не работает на win7 x64, AutoHotkey_L&nbsp; Unicode.</p><p>При использовании скрипта (by <strong>Malcev</strong>) некоторые файлы добавляются некорректно.<br />Code: 2 (00000002)<br />Message: Can&#039;t open the file<br />Думаю, проблема связана с тегами...</p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Fri, 24 Feb 2012 22:33:46 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57211#p57211</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57173#p57173</link>
			<description><![CDATA[<p>Совместил и переработал срипты:<br /><strong>1.<a href="http://www.autohotkey.com/forum/post-141229.html#141229">ShellContextMenu.ahk by Sean</a><br />2.<a href="http://www.autohotkey.com/forum/post-271279.html&amp;sid=77aa454fa2b3ebd44d1e67265dac28da#271279">Get and invoke ContextMenu (ShellEx) items without bring up popup menu by Eucaly61</a><br />3.<a href="http://forum.script-coding.com/viewtopic.php?pid=56786#p56786">Выполнить пункт меню файла в папке, используя COM</a> спасибо teadrinker</strong>, англ.<a href="http://www.autohotkey.com/forum/topic78261.html">InvokeVerb()</a></p><p>Добавление выделенных папок и файлов в AIMP3 работает. Возможно вызывать и другие пункты контекстного меню проводника применительно к выделенным папкам и файлам, но без недостатков не обошлось. С каждым вызовом меню происходит небольшая утечка памяти и объектов Gdi, от меня не зависящая, с которой было принято решение бороться с помощью перезагрузки скрипта, знаете другое решение - поделитесь.</p><p>Скрипт для получения (путём копирование в буфер обмена) списка доступных пунктов меню и визуализации самого меню. Вызываются команды вручную посредством клика, скрипт определяет ID команды и вызывает её. Последовательность пунктов меню и следовательно ID команд меняется, из-за чего автоматизация иногда бывает затруднена. Если вы видете что при вызове необходимого вам пункта меню для разных файлов и папок на разных дисках ID остаётся преждним, обычно это стандартные пункты &quot;Свойства&quot;,&quot;Удалить&quot;,&quot;Создать ярлык&quot;... , то можете использовать его во втором скрипте заменив функцию GetContexMenuCmdID(&quot;текст пункта меню|подменю&quot;) на полученный ID</p><div class="codebox"><pre><code>/*
get and invoke ContextMenu (ShellEx) items without bring up popup menu
http://www.autohotkey.com/forum/post-271279.html#271279
IShellFolder::GetUIObjectOf
http://winapi.freetechsecrets.com/win32/WIN32IShellFolderGetUIObjectOf_Now_Su.htm
IContextMenu::QueryContextMenu
http://winapi.freetechsecrets.com/win32/WIN32IContextMenu.htm
Shell Interfaces
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774328(v=vs.85).aspx
http://source.winehq.org/source/include/shobjidl.idl#L252
http://www.koders.com/noncode/fid66A0E1FAB1C94FB665CFA5236DA4CDAEA22742CE.aspx#L1051
http://www.netez.com/2xExplorer/shellFAQ/shmain.html
*/

DetectHiddenWindows, On 
Process, Exist 
WinGet, hAHK,ID,ahk_pid %ErrorLevel%

Reload_After:=20 ; боремся с утечкой ресурсов путём перезагрузки скрипта после определённого кол-ва вызовов меню
                 ; если знаете, предложите другой способ ?

global hMenu,mStr,pcm,ici,riid_IShellFolder,riid_IContextMenu,mText
riid_IShellFolder:=GUID(IID_IShellFolder,&quot;{000214E6-0000-0000-C000-000000000046}&quot;)
riid_IContextMenu:=GUID(IID_IContextMenu,&quot;{000214E4-0000-0000-C000-000000000046}&quot;)

global pHandleMenuMsg,pcm2,pcm3,uIdSubclass:=1
pHandleMenuMsg:=RegisterCallback(&quot;HandleMenuMsg&quot;,&quot;Fast&quot;,6)

NumPut(VarSetCapacity(ici,16+5*A_PtrSize,0),ici)
NumPut(0x4000,ici,4) ; CMIC_MASK_UNICODE = 0x4000
NumPut(hAHK,ici,8)

^F11::
WinGet, ID,, A
WinGetClass, Class, A
if !(Class~=&quot;(Cabinet|Explore)WClass&quot;)
Return

oShell:=ComObjCreate(&quot;Shell.Application&quot;)
Loop % oShell.Windows.Count {
oIE:=oShell.Windows.Item(A_Index-1)
Sleep 10
} Until oIE.HWND=ID
 
oFolderItems:=oIE.Document.SelectedItems
pc:=oFolderItems.Count
if !pc {
MsgBox, Ничего не выделено!
oShell:=oIE:=oFolderItems:=&quot;&quot;
Return
}

pl:=[]
VarSetCapacity(apidl,pc*A_PtrSize,0)
pc:=0 ; pointers count
hMenu:=DllCall(&quot;CreatePopupMenu&quot;)
for Item in oFolderItems {
DllCall(&quot;shell32\SHParseDisplayName&quot;,&quot;str&quot;,Item.Path,&quot;ptr&quot;,0,&quot;ptr*&quot;,_pidl,&quot;uint&quot;,0,&quot;uint*&quot;,0)
DllCall(&quot;shell32\SHBindToParent&quot;,&quot;ptr&quot;,_pidl,&quot;ptr&quot;,riid_IShellFolder,&quot;ptr*&quot;,pIShellFolder,&quot;ptr*&quot;,pidl)
pl.Insert(_pidl)
NumPut(pidl,apidl,pc*A_PtrSize)
++pc
if (pc&lt;&gt;oFolderItems.Count) ; Release ?
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
}
; IShellFolder::GetUIObjectOf
if DllCall(VTable(pIShellFolder,10),&quot;ptr&quot;,pIShellFolder,&quot;ptr&quot;,0,&quot;uint&quot;,pc,&quot;ptr&quot;,&amp;apidl,&quot;ptr&quot;,riid_IContextMenu,&quot;ptr&quot;,0,&quot;ptr*&quot;,pcm)
return
; IUnknown::QueryInterface
DllCall(VTable(pcm,0),&quot;ptr&quot;,pcm,&quot;ptr&quot;,GUID(IID_IContextMenu3,&quot;{BCFCE0A0-EC17-11D0-8D10-00A0C90F2719}&quot;),&quot;ptr*&quot;,pcm3)
DllCall(VTable(pcm,0),&quot;ptr&quot;,pcm,&quot;ptr&quot;,GUID(IID_IContextMenu2,&quot;{000214F4-0000-0000-C000-000000000046}&quot;),&quot;ptr*&quot;,pcm2)
if pcm {
; IContextMenu::QueryContextMenu         ##### Утечка памяти и объектов Gdi !? #####
DllCall(VTable(pcm,3),&quot;ptr&quot;,pcm,&quot;ptr&quot;,hMenu,&quot;uint&quot;,0,&quot;uint&quot;,3,&quot;uint&quot;,0x7FFF,&quot;uint&quot;,0)
GetContexMenuCmdID(&quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;) ; текст пункта меню длиной этой строки будет помещён в буфер обмена
subclassed:=DllCall(&quot;SetWindowSubclass&quot;,&quot;ptr&quot;,hAHK,&quot;ptr&quot;,pHandleMenuMsg,&quot;ptr&quot;,uIdSubclass,&quot;ptr&quot;,0)
DllCall(&quot;GetCursorPos&quot;,&quot;int64P&quot;,pt)                      ; TPM_RETURNCMD   =   0x100
TrayTip,,% &quot;ID команды`nменю &quot; miID:=DllCall(&quot;TrackPopupMenu&quot;,&quot;ptr&quot;,hMenu,&quot;ptr&quot;,0x100,&quot;int&quot;,pt&lt;&lt;32&gt;&gt;32,&quot;int&quot;,pt&gt;&gt;32,&quot;int&quot;,0,&quot;ptr&quot;,hAHK,&quot;ptr&quot;,0) 
NumPut(miID-3,ici,8+A_PtrSize)
; IContextMenu::InvokeCommand
DllCall(VTable(pcm,4),&quot;ptr&quot;,pcm,&quot;ptr&quot;,&amp;ici)
}
; Release
DllCall(VTable(pcm,2),&quot;ptr&quot;,pcm3)
DllCall(VTable(pcm,2),&quot;ptr&quot;,pcm2)
DllCall(VTable(pcm,2),&quot;ptr&quot;,pcm)
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
Loop % pl.MaxIndex()
DllCall(&quot;ole32\CoTaskMemFree&quot;,&quot;ptr&quot;,pl[A_Index])
if DllCall(&quot;RemoveWindowSubclass&quot;,&quot;ptr&quot;,hAHK,&quot;ptr&quot;,pHandleMenuMsg,&quot;ptr&quot;,uIdSubclass)
subclassed:=0
DllCall(&quot;DestroyMenu&quot;,&quot;ptr&quot;,hMenu)
oShell:=oIE:=oFolderItems:=&quot;&quot;
Clipboard:=mText ; Поместим в буфер обмена текст пунктов меню у которых он получен
--Reload_After
if !Reload_After
Reload
Return

Esc::
if subclassed
DllCall(&quot;RemoveWindowSubclass&quot;,&quot;uint&quot;,hAHK,&quot;uint&quot;,pHandleMenuMsg,&quot;uint&quot;,uIdSubclass)
ExitApp

GetContexMenuCmdID(CmdName)
{
 Loop, Parse, CmdName, | 
 {
  nmatch:=A_Index
  miText:=A_LoopField
  nSize:=StrLen(miText)+2 ; &quot;&amp;&quot; + 00
  VarSetCapacity(mStr,nSize*2,0)
  if (A_Index=1)
  _hMenu:=hMenu
  else _hMenu:=DllCall(&quot;GetSubMenu&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
  Loop, % DllCall(&quot;GetMenuItemCount&quot;,&quot;ptr&quot;,_hMenu)
  { 
    miN:=A_Index-1, miID:=DllCall(&quot;GetMenuItemID&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
    DllCall(&quot;GetMenuStringW&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN,&quot;wstr&quot;,mStr,&quot;int&quot;,nSize,&quot;uint&quot;,0x400)
    StringReplace, _mStr,mStr,&amp;,,All
	mText.=mStr &quot;`n&quot;
    if (miText=_mStr) {
    ++match
    Break
    }
  }
 }
 if (match=nmatch)
 return miID
}

VTable(ptr, n) {
  return NumGet(NumGet(ptr+0),n*A_PtrSize)
}

GUID(ByRef GUID, sGUID) ; Converts a string to a binary GUID and returns its address.
{
  VarSetCapacity(GUID,16,0)
  return DllCall(&quot;ole32\CLSIDFromString&quot;,&quot;wstr&quot;,sGUID,&quot;ptr&quot;,&amp;GUID) &gt;= 0 ? &amp;GUID : &quot;&quot;
}

HandleMenuMsg(hWnd,Msg,wParam,lParam,IdSubclass,dwRefData)
{ 
  Critical
  if (IdSubclass=1) {
   If pcm3 { 
   If !DllCall(VTable(pcm3,7),&quot;ptr&quot;, pcm3,&quot;uint&quot;,Msg,&quot;uint&quot;,wParam, &quot;ptr&quot;,lParam,&quot;uintP&quot;,lResult)
   Return lResult
   } 
   Else If pcm2 {
   If !DllCall(VTable(pcm3,6),&quot;ptr&quot;,pcm2,&quot;uint&quot;,Msg,&quot;uint&quot;,wParam,&quot;ptr&quot;,lParam) 
   Return 0 
   } 
 }
  Return DllCall(&quot;DefSubclassProc&quot;,&quot;uint&quot;,hWnd,&quot;uint&quot;,Msg,&quot;uint&quot;,wParam,&quot;ptr&quot;,lParam)
}

/*
529 WM_ENTERMENULOOP
32  WM_SETCURSOR
278 WM_INITMENU 
279 WM_INITMENUPOPUP
44  WM_MEASUREITEM
43  WM_DRAWITEM 
289 WM_ENTERIDLE
287 WM_MENUSELECT
533 WM_CAPTURECHANGED 
293
530 WM_EXITMENULOOP
*/</code></pre></div><p>Рабочий скрипт, добвляет файлы и папки в AIMP3 посредством выделения в проводнике и нажатия Ctrl + F11 </p><div class="codebox"><pre><code>/*
get and invoke ContextMenu (ShellEx) items without bring up popup menu
http://www.autohotkey.com/forum/post-271279.html#271279
IShellFolder::GetUIObjectOf
http://winapi.freetechsecrets.com/win32/WIN32IShellFolderGetUIObjectOf_Now_Su.htm
IContextMenu::QueryContextMenu
http://winapi.freetechsecrets.com/win32/WIN32IContextMenu.htm
Shell Interfaces
http://msdn.microsoft.com/en-us/library/windows/desktop/bb774328(v=vs.85).aspx
http://source.winehq.org/source/include/shobjidl.idl#L252
http://www.koders.com/noncode/fid66A0E1FAB1C94FB665CFA5236DA4CDAEA22742CE.aspx#L1051
http://www.netez.com/2xExplorer/shellFAQ/shmain.html
*/

DetectHiddenWindows, On 
Process, Exist 
WinGet, hAHK,ID,ahk_pid %ErrorLevel%

Reload_After:=20 ; боремся с утечкой ресурсов путём перезагрузки скрипта после определённого кол-ва вызовов меню
                 ; если знаете, предложите другой способ ?

global hMenu,mStr,pcm,ici,riid_IShellFolder,riid_IContextMenu
riid_IShellFolder:=GUID(IID_IShellFolder,&quot;{000214E6-0000-0000-C000-000000000046}&quot;)
riid_IContextMenu:=GUID(IID_IContextMenu,&quot;{000214E4-0000-0000-C000-000000000046}&quot;)

oShell:=ComObjCreate(&quot;Shell.Application&quot;)
NumPut(VarSetCapacity(ici,16+5*A_PtrSize,0),ici)
NumPut(0x4000,ici,4) ; CMIC_MASK_UNICODE = 0x4000
NumPut(hAHK,ici,8)

^F11::
WinGet, ID,, A
WinGetClass, Class, A
if !(Class~=&quot;(Cabinet|Explore)WClass&quot;)
Return

Loop % oShell.Windows.Count {
oIE:=oShell.Windows.Item(A_Index-1)
Sleep 10
} Until oIE.HWND=ID
 
oFolderItems:=oIE.Document.SelectedItems
pc:=oFolderItems.Count
if !pc {
MsgBox, Ничего не выделено!
oShell:=oIE:=oFolderItems:=&quot;&quot;
Return
}

pl:=[]
VarSetCapacity(apidl,pc*A_PtrSize,0)
pc:=0 ; pointers count
hMenu:=DllCall(&quot;CreatePopupMenu&quot;)
for Item in oFolderItems {
DllCall(&quot;shell32\SHParseDisplayName&quot;,&quot;str&quot;,Item.Path,&quot;ptr&quot;,0,&quot;ptr*&quot;,_pidl,&quot;uint&quot;,0,&quot;uint*&quot;,0)
DllCall(&quot;shell32\SHBindToParent&quot;,&quot;ptr&quot;,_pidl,&quot;ptr&quot;,riid_IShellFolder,&quot;ptr*&quot;,pIShellFolder,&quot;ptr*&quot;,pidl)
pl.Insert(_pidl)
NumPut(pidl,apidl,pc*A_PtrSize)
++pc
if (pc&lt;&gt;oFolderItems.Count) ; Release ?
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
}
; IShellFolder::GetUIObjectOf
if DllCall(VTable(pIShellFolder, 10),&quot;ptr&quot;,pIShellFolder,&quot;ptr&quot;,0,&quot;uint&quot;,pc,&quot;ptr&quot;,&amp;apidl,&quot;ptr&quot;,riid_IContextMenu,&quot;ptr&quot;,0,&quot;ptr*&quot;,pcm)
return
if pcm {
; IContextMenu::QueryContextMenu         ##### Утечка памяти и объектов Gdi !? #####
DllCall(VTable(pcm,3),&quot;ptr&quot;,pcm,&quot;ptr&quot;,hMenu,&quot;uint&quot;,0,&quot;uint&quot;,3,&quot;uint&quot;,0x7FFF,&quot;uint&quot;,0)
; DllCall(&quot;GetCursorPos&quot;,&quot;int64P&quot;,pt)                       ; TPM_RETURNCMD   =   0x100
; TrayTip,,% &quot;ID команды`nменю &quot; miID:=DllCall(&quot;TrackPopupMenu&quot;,&quot;ptr&quot;,hMenu,&quot;ptr&quot;,0x100,&quot;int&quot;,pt&lt;&lt;32&gt;&gt;32,&quot;int&quot;,pt&gt;&gt;32,&quot;int&quot;,0,&quot;ptr&quot;,hAHK,&quot;ptr&quot;,0) 
if miID:=GetContexMenuCmdID(&quot;AIMP3|Добавить в плейлист&quot;) { ; парсим текст меню и подменю для получения ID команды, ID имеет свойство меняться
  NumPut(miID-3,ici,8+A_PtrSize)
; ContextMenu::InvokeCommand
  DllCall(VTable(pcm,4),&quot;ptr&quot;,pcm,&quot;ptr&quot;,&amp;ici)
 }
}
; Release
DllCall(VTable(pcm,2),&quot;ptr&quot;,pcm)
DllCall(VTable(pIShellFolder,2),&quot;ptr&quot;,pIShellFolder)
Loop % pl.MaxIndex()
DllCall(&quot;ole32\CoTaskMemFree&quot;,&quot;ptr&quot;,pl[A_Index])
DllCall(&quot;DestroyMenu&quot;,&quot;ptr&quot;,hMenu)
oIE:=oFolderItems:=&quot;&quot;
--Reload_After
if !Reload_After
Reload
Return

Esc::ExitApp

GetContexMenuCmdID(CmdName)
{
 Loop, Parse, CmdName, | 
 {
  nmatch:=A_Index
  miText:=A_LoopField
  nSize:=StrLen(miText)+2 ; &quot;&amp;&quot; + 00
  VarSetCapacity(mStr,nSize*2,0)
  if (A_Index=1)
  _hMenu:=hMenu
  else _hMenu:=DllCall(&quot;GetSubMenu&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
  Loop, % DllCall(&quot;GetMenuItemCount&quot;,&quot;ptr&quot;,_hMenu)
  { 
    miN:=A_Index-1, miID:=DllCall(&quot;GetMenuItemID&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN)
    DllCall(&quot;GetMenuStringW&quot;,&quot;ptr&quot;,_hMenu,&quot;int&quot;,miN,&quot;wstr&quot;,mStr,&quot;int&quot;,nSize,&quot;uint&quot;,0x400)
    StringReplace, _mStr,mStr,&amp;,,All
	;Clipboard.=mStr &quot;`n&quot;
    if (miText=_mStr) {
    ++match
    Break
    }
  }
 }
 if (match=nmatch)
 return miID
}

VTable(ptr, n) {
  return NumGet(NumGet(ptr+0),n*A_PtrSize)
}

GUID(ByRef GUID, sGUID) ; Converts a string to a binary GUID and returns its address.
{
  VarSetCapacity(GUID,16,0)
  return DllCall(&quot;ole32\CLSIDFromString&quot;,&quot;wstr&quot;,sGUID,&quot;ptr&quot;,&amp;GUID) &gt;= 0 ? &amp;GUID : &quot;&quot;
}</code></pre></div><p>Оба срипта могут использоваться если закрыть глаза на утечку ресурсов <img src="//forum.script-coding.com/img/smilies/cool.png" width="15" height="15" /><br />Скрипт был опробован на двух компьютерах под Windows XP SP3, AutoHotkey_L x86 Unicode,&nbsp; но возможно будет работать и на x64</p><p>Если кому необходимо, скрипт возможно приспособить и для AHK Basic <br /><strong>CoHelper.ahk</strong><br /></p><div class="codebox"><pre><code>/*
CoHelper.ahk
*/

VTable(ppv, idx)
{
   Return DecodeInteger(DecodeInteger(ppv) + idx * 4)
}

DecodeInteger(ptr)
{
   Return *ptr | *++ptr &lt;&lt; 8 | *++ptr &lt;&lt; 16 | *++ptr &lt;&lt; 24
}

EncodeInteger(ref, val)
{
   DllCall(&quot;ntdll\RtlFillMemoryUlong&quot;, &quot;Uint&quot;, ref, &quot;Uint&quot;, 4, &quot;Uint&quot;, val)
}

Ansi2Unicode(ByRef sString, ByRef wString, nLen = 0)
{
   If !nLen
      nLen := DllCall(&quot;MultiByteToWideChar&quot;
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, &amp;sString
      , &quot;int&quot;,  -1
      , &quot;Uint&quot;, 0
      , &quot;int&quot;,  0)

   VarSetCapacity(wString, nLen * 2)

   DllCall(&quot;MultiByteToWideChar&quot;
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, &amp;sString
      , &quot;int&quot;,  -1
      , &quot;Uint&quot;, &amp;wString
      , &quot;int&quot;,  nLen)
}

Unicode2Ansi(ByRef wString, ByRef sString, nLen = 0)
{
   pString := wString + 0 &gt; 65535 ? wString : &amp;wString

   If !nLen
      nLen := DllCall(&quot;WideCharToMultiByte&quot;
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, pString
      , &quot;int&quot;,  -1
      , &quot;Uint&quot;, 0
      , &quot;int&quot;,  0
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0)

   VarSetCapacity(sString, nLen)

   DllCall(&quot;WideCharToMultiByte&quot;
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, pString
      , &quot;int&quot;,  -1
      , &quot;str&quot;,  sString
      , &quot;int&quot;,  nLen
      , &quot;Uint&quot;, 0
      , &quot;Uint&quot;, 0)
}

CLSID4ProgID(Byref CLSID, sProgID)
{
   VarSetCapacity(CLSID, 16)
   Ansi2Unicode(sProgID, wProgID)
   DllCall(&quot;ole32\CLSIDFromProgID&quot;, &quot;str&quot;, wProgID, &quot;str&quot;, CLSID)
}

GUID4String(Byref CLSID, sString)
{
   VarSetCapacity(CLSID, 16, 0)
   Ansi2Unicode(sString, wString, 39)
   DllCall(&quot;ole32\CLSIDFromString&quot;, &quot;str&quot;, wString, &quot;str&quot;, CLSID)
}

String4GUID(Byref CLSID)
{
   VarSetCapacity(wString, 39 * 2)
   DllCall(&quot;ole32\StringFromGUID2&quot;, &quot;str&quot;, CLSID, &quot;str&quot;, wString, &quot;int&quot;, 39)
   Unicode2Ansi(wString, sString, 39)
   Return sString
}

CreateObject(ByRef CLSID, ByRef IID, CLSCTX = 5)
{
   If ( StrLen(CLSID) = 38 )
   GUID4String(CLSID, CLSID)
   If ( StrLen(  IID) = 38 )
   GUID4String(  IID,   IID)
   DllCall(&quot;ole32\CoCreateInstance&quot;, &quot;str&quot;, CLSID, &quot;Uint&quot;, 0, &quot;Uint&quot;, CLSCTX, &quot;str&quot;, IID, &quot;UintP&quot;, ppv)
   Return ppv
}

GetObject(Namespace)
{
   Ansi2Unicode(Namespace, wNamespace)
   GUID4String(IID_IDispatch, &quot;{00020400-0000-0000-C000-000000000046}&quot;)
   DllCall(&quot;ole32\CoGetObject&quot;, &quot;str&quot;, wNamespace, &quot;Uint&quot;, 0, &quot;str&quot;, IID_IDispatch, &quot;UintP&quot;, pdisp)
   Return pdisp
}

GetActiveObject(ProgID)
{
   CLSID4ProgID(CLSID, ProgID)
   DllCall(&quot;oleaut32\GetActiveObject&quot;, &quot;str&quot;, CLSID, &quot;Uint&quot;, 0, &quot;UintP&quot;, punk)
   Return punk
}

SysAllocString(sString)
{
   Ansi2Unicode(sString, wString)
   Return DllCall(&quot;oleaut32\SysAllocString&quot;, &quot;str&quot;, wString)
}

SysFreeString(pString)
{
   Return DllCall(&quot;oleaut32\SysFreeString&quot;, &quot;Uint&quot;, pString)
}

OleInitialize()
{
   DllCall(&quot;ole32\OleInitialize&quot;, &quot;Uint&quot;, 0)
}

OleUninitialize()
{
   DllCall(&quot;ole32\OleUninitialize&quot;)
}

CoInitialize()
{
   DllCall(&quot;ole32\CoInitialize&quot;, &quot;Uint&quot;, 0)
}

CoUninitialize()
{
   DllCall(&quot;ole32\CoUninitialize&quot;)
}

QueryInterface(ppv, ByRef IID)
{
   If ( StrLen(IID) = 38 )
   GUID4String(IID,   IID)
   DllCall(DecodeInteger(DecodeInteger(ppv)), &quot;Uint&quot;, ppv, &quot;str&quot;, IID, &quot;UintP&quot;, ppv)
   Return ppv
}

AddRef(ppv)
{
   Return DllCall(DecodeInteger(DecodeInteger(ppv) + 4), &quot;Uint&quot;, ppv)
}

Release(ppv)
{
   Return DllCall(DecodeInteger(DecodeInteger(ppv) + 8), &quot;Uint&quot;, ppv)
}

QueryService(ppv, ByRef SID, ByRef IID)
{
   If ( StrLen(SID) = 38 )
   GUID4String(SID,   SID)
   If ( StrLen(IID) = 38 )
   GUID4String(IID,   IID)
   GUID4String(IID_IServiceProvider, &quot;{6D5140C1-7436-11CE-8034-00AA006009FA}&quot;)
   DllCall(DecodeInteger(DecodeInteger(ppv)), &quot;Uint&quot;, ppv, &quot;str&quot;, IID_IServiceProvider, &quot;UintP&quot;, psp)
   DllCall(DecodeInteger(DecodeInteger(psp) + 12), &quot;Uint&quot;, psp, &quot;str&quot;, SID, &quot;str&quot;, IID, &quot;UintP&quot;, ppv)
   DllCall(DecodeInteger(DecodeInteger(psp) +  8), &quot;Uint&quot;, psp)
   Return ppv
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kirtech)]]></author>
			<pubDate>Fri, 24 Feb 2012 03:44:51 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57173#p57173</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57053#p57053</link>
			<description><![CDATA[<p>Идеальный вариант вижу в использовании оконных сообщений, по типу <a href="http://forum.script-coding.com/viewtopic.php?id=6438">таких</a>.</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 18 Feb 2012 22:34:35 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57053#p57053</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57052#p57052</link>
			<description><![CDATA[<p><strong>Grey</strong>, спасибо за развернутый ответ. <br />Я так понимаю, даже если бы эта штука работала, то пострадала бы еще скорость результирующего скрипта.<br />Поэтому, те, кому <em>режет глаза</em> всплывающее меню - могут использовать скрипт от <strong>Malcev</strong>. Остальные - юзать более универсальный (!) скрипт от <strong>Grey</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (Xwansu)]]></author>
			<pubDate>Sat, 18 Feb 2012 22:09:10 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57052#p57052</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57051#p57051</link>
			<description><![CDATA[<p>Чтобы запустить <a href="http://www.autohotkey.net/~Sean/Scripts/ShellContextMenu.zip">тот</a> скрипт с первой страницы, надо скачать библиотеку обозначенную как <a href="http://www.autohotkey.com/forum/topic22923.html">COM.zip</a>, и поместить её в папку Lib созданную в корневой папке программы. Это ещё не всё, далее в самом <a href="http://www.autohotkey.net/~Sean/Scripts/ShellContextMenu.zip">том</a> (ShellContextMenu.ahk) скрипте, нужно добавить префиксы к вызываемым функциям (на пример: к CoInitialize() добавить COM_, чтобы получилось COM_CoInitialize()), строку вида: #Include CoHelper.ahk - следует удалить. Скрипт с третьей страницы работает и с COM, и с COM_L библиотекой.</p><p>В итоге, что получается, даже если всё же выше обозначенные (<a href="http://www.autohotkey.com/forum/post-141229.html#141229">тот</a> и <a href="http://www.autohotkey.com/forum/post-271279.html#271279">этот</a>) скрипты запускаются:<br />первый скрипт выводит контекстное меню с указанием пути до папки скрипта<br />второй выводит ГЪЮИ с информацией о GUID и т.п., далее дела у него не идут</p><p>А теперь стоит подумать, для чего эта <em>возня</em>, если всё можно решить эмуляцией нажатия одной кнопки, которая в коде прописана одной строкой?</p>]]></description>
			<author><![CDATA[null@example.com (Grey)]]></author>
			<pubDate>Sat, 18 Feb 2012 22:03:56 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57051#p57051</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: хоткей на добавление выделенного файла в плейлист AIMP3/Winamp]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=57049#p57049</link>
			<description><![CDATA[<p>cohelper.ahk<br /><a href="http://de.autohotkey.com/forum/topic7108.html">http://de.autohotkey.com/forum/topic7108.html</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sat, 18 Feb 2012 21:34:03 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=57049#p57049</guid>
		</item>
	</channel>
</rss>
