<?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=12647&amp;type=atom" />
	<updated>2023-02-08T07:27:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12647</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156677#p156677" />
			<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>2023-02-08T07:27:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156677#p156677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156674#p156674" />
			<content type="html"><![CDATA[<p>Уважаемый <strong>teadrinker</strong> пните хоть куда смотреть то.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2023-02-08T05:44:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156674#p156674</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156671#p156671" />
			<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>2023-02-07T23:59:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156671#p156671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=156670#p156670" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Подскажите пожалуйста как сделать что бы в стороннем приложении (сторонний проводник) тоже работало.<br /></p><div class="codebox"><pre><code>ahk_class dopus.lister
ahk_exe dopus.exe
ahk_pid 9064</code></pre></div><p>При добавлении этого не работает.<br /></p><div class="codebox"><pre><code>else If WinActive(&quot;ahk_class Progman&quot;) or WinActive(&quot;ahk_class CabinetWClass&quot;) or WinActive(&quot;ahk_class dopus.lister&quot;)</code></pre></div><div class="codebox"><pre><code>vk4::
Sleep, 60
Click
WinClose ahk_class #32768 ahk_exe explorer.exe
If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;)) or (RegExMatch(path, &quot;i)\.au3$&quot;))
Run C:\Program Files\AkelPad\AkelPad.exe %path%
 else If WinActive(&quot;ahk_class Progman&quot;) or WinActive(&quot;ahk_class CabinetWClass&quot;) or WinActive(&quot;ahk_class dopus.lister&quot;)
   SendInput {vkD}
else
SendInput % &quot;{&quot; A_ThisHotkey &quot;}&quot;
  return

#If
Explorer_GetSel()

{
if !(window := Explorer_GetWindow())
return &quot;&quot;
if (window=&quot;desktop&quot;)

{
ControlGet, hwWindow, HWND,, SysListView321, ahk_class Progman 
if !hwWindow
ControlGet, hwWindow, HWND,, SysListView321, A
ControlGet, files, List, % &quot;Selected Col1&quot;,, ahk_id %hwWindow%
base := SubStr(A_Desktop,0,1)==&quot;\&quot; ? SubStr(A_Desktop,1,-1) : A_Desktop
Loop, Parse, files, `n, `r
{
path := base &quot;\&quot; A_LoopField
IfExist %path%
ret .= path &quot;`n&quot;
}
}
else
{
collection := window.document.SelectedItems
for item in collection
ret .= item.path &quot;`n&quot;
}
return Trim(ret,&quot;`n&quot;)
}
Explorer_GetWindow()
{
WinGetClass class, % &quot;ahk_id&quot; hwnd := WinExist(&quot;A&quot;)
if (class ~= &quot;(Cabinet|Explore|)WClass&quot;)
{
for window in ComObjCreate(&quot;Shell.Application&quot;).Windows
if (window.hwnd==hwnd)
return window
}
else if (class ~= &quot;Progman|WorkerW|&quot;)
return &quot;desktop&quot;
}
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2023-02-07T23:28:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=156670#p156670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120602#p120602" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;)) or (RegExMatch(path, &quot;i)\.txt$&quot;))
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-10-30T01:13:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120602#p120602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=120594#p120594" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Подскажите пожалуйста как добавить помимо &quot;ahk&quot; ещё и &quot;txt&quot; расширение.<br />Я так думаю что это нужно сделать здесь, но только ни как не пойму.<br /></p><div class="codebox"><pre><code>If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;))</code></pre></div><div class="codebox"><pre><code>MButton::
Sleep, 60
Click
WinClose ahk_class #32768 ahk_exe explorer.exe
If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;))
Run C:\Windows\notepad.exe %path%
else If Explorer_GetSel()
    SendInput {Enter}
else
    SendInput {MButton}
return
#If
Explorer_GetSel()
{
if !(window := Explorer_GetWindow())
return &quot;&quot;
if (window=&quot;desktop&quot;)
{
ControlGet, hwWindow, HWND,, SysListView321, ahk_class Progman
if !hwWindow
ControlGet, hwWindow, HWND,, SysListView321, A
ControlGet, files, List, % &quot;Selected Col1&quot;,, ahk_id %hwWindow%
base := SubStr(A_Desktop,0,1)==&quot;\&quot; ? SubStr(A_Desktop,1,-1) : A_Desktop
Loop, Parse, files, `n, `r
{
path := base &quot;\&quot; A_LoopField
IfExist %path%
ret .= path &quot;`n&quot;
}
}
else
{
collection := window.document.SelectedItems
for item in collection
ret .= item.path &quot;`n&quot;
}
return Trim(ret,&quot;`n&quot;)
}
Explorer_GetWindow()
{
WinGetClass class, % &quot;ahk_id&quot; hwnd := WinExist(&quot;A&quot;)
if (class ~= &quot;(Cabinet|Explore)WClass&quot;)
{
for window in ComObjCreate(&quot;Shell.Application&quot;).Windows
if (window.hwnd==hwnd)
return window
}
else if (class ~= &quot;Progman|WorkerW&quot;)
return &quot;desktop&quot;
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-10-29T21:54:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=120594#p120594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115598#p115598" />
			<content type="html"><![CDATA[<p>Вроде вопрос только про папки был. Ну ладно, тогда вместо этого: &quot;else If Explorer_GetSel()&quot;, пиши: &quot;else If WinActive(&quot;ahk_class Progman&quot;) or WinActive(&quot;ahk_class CabinetWClass&quot;)&quot;.</p>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-05-02T00:31:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115598#p115598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115597#p115597" />
			<content type="html"><![CDATA[<p>Всё работает ,а как бы сделать что бы ещё и ярлыки папок открывало.</p>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-05-01T22:33:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115597#p115597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115568#p115568" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>MButton::
Sleep, 60
Click
WinClose ahk_class #32768 ahk_exe explorer.exe
If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;))
Run C:\Windows\notepad.exe %path%
else If Explorer_GetSel()
    SendInput {Enter}
else
    SendInput {MButton}
return
#If
Explorer_GetSel()
{
if !(window := Explorer_GetWindow())
return &quot;&quot;
if (window=&quot;desktop&quot;)
{
ControlGet, hwWindow, HWND,, SysListView321, ahk_class Progman
if !hwWindow
ControlGet, hwWindow, HWND,, SysListView321, A
ControlGet, files, List, % &quot;Selected Col1&quot;,, ahk_id %hwWindow%
base := SubStr(A_Desktop,0,1)==&quot;\&quot; ? SubStr(A_Desktop,1,-1) : A_Desktop
Loop, Parse, files, `n, `r
{
path := base &quot;\&quot; A_LoopField
IfExist %path%
ret .= path &quot;`n&quot;
}
}
else
{
collection := window.document.SelectedItems
for item in collection
ret .= item.path &quot;`n&quot;
}
return Trim(ret,&quot;`n&quot;)
}
Explorer_GetWindow()
{
WinGetClass class, % &quot;ahk_id&quot; hwnd := WinExist(&quot;A&quot;)
if (class ~= &quot;(Cabinet|Explore)WClass&quot;)
{
for window in ComObjCreate(&quot;Shell.Application&quot;).Windows
if (window.hwnd==hwnd)
return window
}
else if (class ~= &quot;Progman|WorkerW&quot;)
return &quot;desktop&quot;
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[svoboden]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34280</uri>
			</author>
			<updated>2017-05-01T00:18:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115568#p115568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Открыть выделенную папку средней кнопкой мыши]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115567#p115567" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Есть скрипт на открытие средней кнопкой мыши файла с расширением&nbsp; &quot;ahk&quot;, как бы туда добавить ещё открытие папки.<br /></p><div class="codebox"><pre><code>~*$vk4::
Sleep, 60
Click
WinClose ahk_class #32768 ahk_exe explorer.exe
If (path := Explorer_GetSel()) &amp;&amp; (RegExMatch(path, &quot;i)\.ahk$&quot;))
Run C:\Program Files (x86)\AkelPad\AkelPad.exe %path%
Else
SendInput % &quot;{&quot; A_ThisHotkey &quot;}&quot;
Double:
Double := 0
return
#If
Explorer_GetSel()
{
if !(window := Explorer_GetWindow())
return &quot;&quot;
if (window=&quot;desktop&quot;)
{
ControlGet, hwWindow, HWND,, SysListView321, ahk_class Progman
if !hwWindow
ControlGet, hwWindow, HWND,, SysListView321, A
ControlGet, files, List, % &quot;Selected Col1&quot;,, ahk_id %hwWindow%
base := SubStr(A_Desktop,0,1)==&quot;\&quot; ? SubStr(A_Desktop,1,-1) : A_Desktop
Loop, Parse, files, `n, `r
{
path := base &quot;\&quot; A_LoopField
IfExist %path%
ret .= path &quot;`n&quot;
}
}
else
{
collection := window.document.SelectedItems
for item in collection
ret .= item.path &quot;`n&quot;
}
return Trim(ret,&quot;`n&quot;)
}
Explorer_GetWindow()
{
WinGetClass class, % &quot;ahk_id&quot; hwnd := WinExist(&quot;A&quot;)
if (class ~= &quot;(Cabinet|Explore)WClass&quot;)
{
for window in ComObjCreate(&quot;Shell.Application&quot;).Windows
if (window.hwnd==hwnd)
return window
}
else if (class ~= &quot;Progman|WorkerW&quot;)
return &quot;desktop&quot;
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-05-01T00:01:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115567#p115567</id>
		</entry>
</feed>
